You are on page 1of 6

SQLCA structure element sqlcaid sqlcabc sqlcode sqlerrml sqlerrmc sqlerrp sqlerrd sqlwarn sqlstate

datatype char integer integer small int char char integer[6] char char

length 8 4 4 2 70 8 24 11 5 136 CASE

Sqlrrd array sqlerrd[0] sqlerrd[1] sqlerrd[2] integer integer integer

4 4 code page compund SQL 4 sql query sql Procedure Connect 4 Prepare Compund Sql Connect 4 enforcement,trigger Connect

sqlerrd[3]

integer

sqlerrd[4]

integer

sqlerrd[5]

integer

4 partitioned Db 24 CASE

Sqlwarn array sqlwarn0 sqlwarn1 sqlwarn2 sqlwarn3 sqlwarn4 sqlwarn5 sqlwarn6 sqlwarn7 sqlwarn8 sqlwarn9 sqlwarn10 sqlstate char char char char char char char char char char char char 1 1 1 1

ASSOCIATE 1 update/delete 1 1 date 1 CONNECT 1 1 1 5 16

SQLDA Structure sqldaid sqldabc sqln sqld sqlvar base sqlvar

char integer small int small int Structure array

8 4 2 2

sqltype

SMALLINT

sqllen

SMALLINT

sqldata

Pointer

sqlind

Pointer

sqlname

VARCHAR(30)

usage to identify this datastructure . Will contain "SQLCA. " Size of SQLCA data structure - always 136 SQL return code value size of sqlrrmc is 0-70 one or more error message tokens , separated by "0xFF" A diagnostic value that represents the type of DB2 server(Verion, Release num, modification) array of 6 integer values , provides additional info abt an error warning indicators identifies outcome of most recently executed SQL statement

maximum expected difference in length of mixed character data when converted to database code page from application c maximum expected difference in length of mixed character data when converted to application code page from Database no.of statements that failed gives number of rows effected by any SQL query contains line number where error was encountered contains 1 if the database is updatable,2 if read-only cost estimate of the resources required to process the statement count of number of successful substatements 0 one-phase commit for down-level-client,1- one-phase commit , 2- one-phase readonly commit , 3- two phase commit No.of rows effected 0- server authentication 1-client 2- Authentication using Db2 connect 4- SERVER- ENCRYPRIT 255- unspecified identification.. partition number that reported the error or warning

blank- if no warnings , W - otherwise w- string was truncated, N - null terminator was truncated w- if null values were eliminated from the argument of the functon w- if #of host variables doesnt match no .of cols selected. z- if associate locators mismatch w- if the statement doesnt have a WHERE clause reserved for future use w- if result of date calculation was adjusted bcoz of invalid date reserved for future use E- if DYN_QUERY_MGMT parameter was enabled w- if a character that couldnt be converted repalced with substitution character w- if arithmetic Exp with errors was ignored during col function processing w- conversion error assigning data into SQLCA a return code that indicates the outcome of most recently executed SQL query

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 variable associated 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.

ase code page from application code page ation code page from Database code page

ommit , 3- two phase commit

You might also like