Informix-ESQL/C Programmer's Manual
Chapter 1: Programming with INFORMIX-ESQL/C
Home
Contents
Index
Master Index
New Book
Programming with INFORMIX-ESQL/C
What Is INFORMIX-ESQL/C?
ESQL/C Executable Files for Windows
ESQL/C Library Functions
Creating an ESQL/C Program
Compiling an ESQL/C Program
ESQL/C Preprocessor
C Preprocessor and Compiler
Default Compilation Order
Running the C Preprocessor First
Using ESQL/C Preprocessor Directives
The include Directive
The define and undef Directives
The ifdef, ifndef, elif, else, and endif Directives
Embedding SQL Statements
Handling Case Sensitivity in Embedded SQL Statements
Using Quotes and Escape Characters
Adding Comments
Specifying Host Variables
Using ESQL/C Header Files
Declaring Function Prototypes
Including Header Files
Declaring and Using Host Variables in SQL Statements
Declaring a Host Variable
Host-Variable Names
Host-Variable Data Types
Initial Host-Variable Values
Scope of Host Variables
Sample Host-Variable Declarations
Assigning a Value to a Host Variable
SQL Identifiers
Null Values in Host Variables
Using Host Variables in Data Structures
Arrays of Host Variables
C Structures as Host Variables
C typedef Expressions as Host Variables
Pointers as Host Variables
Function Parameters as Host Variables
Using Indicator Variables
Values in Indicator Variables
Declaring Indicator Variables
Associating an Indicator Variable with a Host Variable
An Example Using Indicator Variables
Using the esql Command
Requirements for Using esql
Syntax of the esql Command
The esql Command for UNIX
The esql Command for Windows Environments
Options That Affect Preprocessing
Checking the Version Number
Associating Options with Files
Preprocessing Without Compiling or Linking
Generating Thread-Safe Code
Checking for ANSI-Standard SQL Syntax
Defining and Undefining Definitions While Preprocessing
Checking for Missing Indicator Variables
Naming the Location of Include Files
Numbering Lines
Setting the Scope of Cursor Names and Statement IDs
Redirecting Errors and Warnings
Suppressing Warnings
Using X/Open Standards
Running the C Preprocessor Before the ESQL/C Preprocessor
Options for Running the C Preprocessor First
CPFIRST Environment Variable
The Order of Compilation When the C Preprocessor Runs First
Defining Host Variables Based on C #defines and typedefs
Allowing All Valid C Declaration Syntax Inside the EXEC SQL Declare Section
Excluding Statements Inside C Header Files
SQL Keyword Protection
SQL Keyword Protection and the $ Symbol
Preprocessor Options Specific to Windows Environments
Line Wrapping
Changing Error and Warning Displays
Setting Tab Stops
Compiling and Linking Options of the esql Command
Syntax of the Compiling/Linking Options for UNIX
Naming the Executable File on UNIX
Passing Options to the C Compiler
Specifying a Particular C Compiler
Syntax of the Compiling/Linking Options for Windows Environments
Naming the Executable File in Windows Environments
Passing Options to the C Compiler in Windows Environments
Specifying a Particular C Compiler in Windows Environments
Compiling Without Linking
Special Compile Options for Windows Environments
Using a Project File
Creating a Response File
Implicit Options Invoked by the esql Preprocessor in Windows Environments
General Options That Affect Linking
Linking Other C Source and Object Files
Specifying Versions of Informix General Libraries
Special Linking Options for Windows Environments
Passing Arguments to the Linker
Passing Arguments to the Resource Compiler
ESQL/C Dynamic Link Libraries
Using the Same Runtime Routines for Version Independence
Windows Operating System Processor Options Available to the esql Command
Syntax of the Options for Windows Environments
Accessing the ESQL Client-Interface DLL in Windows Environments
Accessing the Import Library
Locating a DLL
Building an Application DLL
Setting and Retrieving Environment Variables in Windows Environments
ifx_putenv()
ifx_getenv()
InetLogin Structure
Fields of the InetLogin Structure
InetLogin Field Values
Precedence of Configuration Values
Using Host Variables in Windows Environments
Declaring Variables with Non-ANSI Storage-Class Modifiers
Using Global ESQL/C Variables
A Sample INFORMIX-ESQL/C Program
Compiling the demo1 Program
Guide to demo1.ec File
Informix-ESQL/C Programmer's Manual
, version 9.1
Copyright © 1998, Informix Software, Inc. All rights reserved.