Entering content frame

 SQLLongDesc 

You can make working with LONG columns easier by using the predefined data type SQLLongDesc to declare host variables. In a FETCH statement, for example, this gives you information on the total length of the LONG column.

The data type SQLLongDesc is declared as a structure in the header file cpc.h:

typedef struct sqllongdesc {
  char *szBuf;
  int cbColLen;
  int cbBufLen;
  int cbBufMax;
} sqllongdesc;

typedef sqllongdesc SQLLongDesc;

The components of this structure declaration have the following meaning:

When a FETCH or GETVAL statement is executed, the precompiler enters the length of the LONG column in the component cbColLen.

You must assign values to the other components before SQL statements. See also: Special Features when Using Data Type SQLLongDesc

 

 

Leaving content frame