skip to main content
IP API Reference for Java : Statement-level Methods for Java : sqlipGetColspec
 

sqlipGetColspec

This method returns the description for the specified column. This method will be called m times where m is the number of columns returned by the sqlipGetNumcols method. You must return the data in the sqlipGetColval method in the same format as the definition of the column. For example, if you return the description of the first column as XO_TYPE_INTEGER, then in sqlipGetColval you must return the data as XO_TYPE_INTEGER.
It is also important to make sure that the column descriptions returned by this method match those defined in your schema.
int sqlipGetColspec(
int iColNum,
xo_int piXODataType,
xo_int pbNullable,
StringBuffer pColName,
xo_int piLen,
xo_int piPrecision,
xo_int piScale);
 
Table 92: sqlipGetColspec 
Parameter
Type
Description
INPUT
 
 
iColumn
int
Column number – first column starts at 0.
OUTPUT
 
 
iXODataType
xo_int
Data type of the column. This information describes how the value of this column will be returned when get_colval is called. See Table 64 for data type definitions.
pbNullalble
xo_int
Whether the column can have null values.
When set to 1, the column can have null values.
When set to 0, the column cannot have null values.
pColName
StringBuffer
Allocate a buffer, fill it with the column name, and return the pointer to this buffer. This buffer is used by the calling method.
piLen
xo_int
Maximum length of the data in this column. Leave null for other types.
CHAR and VARCHAR – maximum length of the string
NUMERIC – precision + 2
piPrecision
xo_int
Number of digits of mantissa precision.
NUMERIC - Number of digits
CHAR and VARCHAR - set to same as piLen
INTEGER=10, SMALLINT=5, DOUBLE=15, REAL=7,FLOAT=15
DATE=10, TIME=8, TIMESTAMP=19
piScale
xo_int
Total number of significant digits to the right of the decimal point. Only required for NUMERIC types.
RETURN
 
 
 
int
OADS_SUCCESS
OADS_ERROR

See also 

sqlipGetColval
sqlipGetNumcols