Upload
mukesh
View
222
Download
0
Embed Size (px)
Citation preview
8/6/2019 sqlca&da
1/6
SQLCA structure
element datatype length
sqlcaid char 8
sqlcabc integer 4
sqlcode integer 4
sqlerrml small int 2
sqlerrmc char 70
sqlerrp char 8
sqlerrd integer[6] 24
sqlwarn char 11
sqlstate char 5
136
Sqlrrd array CASE
sqlerrd[0] integer 4
sqlerrd[1] integer 4 code page
compund SQLsqlerrd[2] integer 4 sql query
sql Procedure
Connect
sqlerrd[3] integer 4 Prepare
Compund Sql
Connect
sqlerrd[4] integer 4 enforcement,trigger
Connect
sqlerrd[5] integer 4 partitioned Db
24
Sqlwarn array CASE
sqlwarn0 char 1
sqlwarn1 char 1
sqlwarn2 char 1
sqlwarn3 char 1
ASSOCIATE
sqlwarn4 char 1 update/delete
sqlwarn5 char 1
sqlwarn6 char 1 date
sqlwarn7 char 1
CONNECT
sqlwarn8 char 1
sqlwarn9 char 1
sqlwarn10 char 1
sqlstate char 5
16
8/6/2019 sqlca&da
2/6
SQLDA Structure
sqldaid char 8
sqldabc integer 4
sqln small int 2
sqld small int 2
sqlvar Structure array
base sqlvar
sqltype SMALLINT
sqllen SMALLINT
sqldata Pointer
sqlind Pointer
sqlname VARCHAR(30)
8/6/2019 sqlca&da
3/6
8/6/2019 sqlca&da
4/6
identifier
size of sqlda
total number of elements in the SQLVAR array
number of cols in the result set data (or) # of host variables or result set data cols
contains information about host variables or result dataset columns
The data type of a host variable used, or
the data type of a column in the result data
set produced.
The size (length), in bytes, of a host
variable used, or the size of a column in the
result data set produced.
A pointer to a location in memory where the
data for a host variable used is stored, or a
pointer to a location in memory where data
for a column in the result data set produced
is to be stored.
A pointer to a location in memory where the
data for the null indicator variableassociated with a host variable used is
stored, or a pointer to a location in memory
where the data for the null indicator variable
associated with a column in the result data
set produced is to be stored.
The unqualified name of a host variable or
a column in the result data set produced.
8/6/2019 sqlca&da
5/6
ge from application code page
age from Database code page
o phase commit
8/6/2019 sqlca&da
6/6