C/C++-Precompiler User Manual: SAP DB 7.4
Embedding SQL Statements in C/C++
General Rules
Conventions for the Order of SQL Statements
Rules for the Declare Section
Syntax of the Declaration Section
Host Variables
Conventions for Host Variables
Structures as Host Variables
Arrays as Host Variables
Simplified Notation for Structure and Array Variables
Indicator Variables
Rules for Indicator Variables
Indicator Values
Permitted Data Types
Basic Data Types
Predefined Data Types
VARCHAR
Example for Permitted VARCHAR Declarations
SQLFILE
SQLLongDesc
Special Features when Using Data Type SQLLongDesc
UNICODE Data Types
Converting Data Types
Generating Structure Definitions
Working with UNICODE Data
Working with LONG Columns
Transferring NULL Values to the Database Instance
Transferring DEFAULT Values to the Database Instance
Connecting to a Database Instance
Overview of Precompiler Statements
Working with Multiple Database Sessions
DECLARE Statements
INCLUDE DECLARE Statement
Statements for Connecting to the Database Instance
SET SERVERDB Statement
CONNECT Statement
CONNECT Statement in the SQL Mode INTERNAL
CONNECT Statement in the SQL Mode ORACLE
Static SQL Statements
Static SQL Statement Without Parameters
Static SQL Statement with Parameters
Dynamic SQL Statements
Dynamic SQL Statements Without Parameters
Dynamic SQL Statements with Parameters
Using the Descriptor
Structure of the Descriptor
sqlvar [i] Entries in the Descriptor
SAP DB Data Types in sqlvar Entries
C/C++ Data Types in sqlvar Entries
Example for Using a Descriptor
PREPARE Statement
DESCRIBE Statement
EXECUTE Statement
OPEN CURSOR Statement
USING Clause
Array Statement
INCLUDE FILE Statement
PUTVAL Statement
GETVAL Statement
WHENEVER Statements
Handling Errors with WHENEVER Statements
Actions for the WHENEVER Statement
Example for Using WHENVER statements
CANCEL Statement
EXEC COMMAND Statement
VERSION Statement
TRACE Statements
Database System Messages
Warning Messages in the Structure sqlca
Programming Notes
Compatibility with Other Database Systems
Special Features in SQL Mode ORACLE
Special Features in SQL Mode ANSI
Functions of the C/C++ Precompiler
Running the Precompiler
Call Options for the Precompiler Linker
Precompiler Options
Precompiler Log
Example: Compiling a SAP DB Application Program
Functions of the Precompiler Runtime Environment
Connection Options at Runtime
Trace Options
Using IRTRACE
Displaying the Current Trace Setting
Changing the Trace Setting
Example of a Trace File
Example: Executing an Application Program
Return Codes
Using the IRCONF Tool
Options for IRCONF
Specifying the Installation Path: -p
Displaying Registered Versions of the Runtime Library: -s
Deleting the Registration of the Runtime Library: -r
Overriding the Driver Name: -d
Registering the Version of the Runtime Library: -i
Overriding the Version Check: -v
Specifying an Additional Key: -k
Displaying Options and Help: -h
IRCONF Error Messages
Syntax Directory
as_clause
array_statement
cancel_session
cancel_statement
c_function
char_host_var
close_statement
command
connect_option
connect_statement
connect_statement_internal
connect_statement_oracle
cursor_name
database_name
database_server
dbproc_clause
dbproc_name
ddl_statement
declare_clause
declare_cursor_statement
declare_statement
describe_statement
descriptor_name
dml_statement
dyna_parameter
dyna_parameter_list
embedded_sql_statement
exec_command_statement
execute_immediate_statement
execute_statement
fetch_spec
fetch_statement
file_host_var
file_name
float_host_var
for_clause
getval_statement
host_variable
hostvarprefix
include_declare_statement
include_file_statement
include_sqlca_statement
include_statement
ind_clause
indicator_marker
indicator_variable
ind_variable_declarator
int_host_var
key
label
loop_parameter
open_cursor_statement
os_command
os_command_async
os_command_sync
parameter
parameter_list
parameter_marker
precom_version
prepare_statement
putval_statement
result_param
rte_version
session_name
session_number
session_spec
set_serverdb_statement
sqlda_variable
statement_name
statement_source
string_constant
structure_tag
table_clause
trace_line
trace_state
trace_statement
type_declarator
uidpwd
unichar_host_var
using_clause
using_expr
variable_declarator
variable_name
version_statement
whenever_action
whenever_condition
whenever_statement