Download Database - National Instruments
Transcript
Chapter 5
SQL Toolkit Library Reference — DBBindColShort
Parameter Discussion
The following table shows the possible status values:
Value Name
Value
DB_TRUNCATION
-1
Data is truncated.
DB_NULL_DATA
-2
Null data.
(none)
Note
Description
positive integer
Number of bytes fetched.
You can use DB_NULL_DATA to place a NULL value into a column as follows: set
the status value for that column to DB_NULL_DATA, then call DBPutRecord. To
prevent DBPutRecord from updating a column, set the status value to
DB_NO_DATA_CHANGE. DB_NO_DATA_CHANGE is useful when the record contains
read-only columns.
Example
short numTries;
long numTriesStat;
...
hstmt = DBActivateSQL(hdbc, "SELECT * FROM TESTLOG");
/* Other variable bindings. */
...
DBBindColShort(hstmt, 5, &numTries, &numTriesStat, "");
/* More variable bindings. */
...
while (DBFetchNext(hstmt) == 0) {
...
if (numTriesStat == DB_NULL_DATA)
...
if (numTriesStat == DB_TRUNCATION)
...
printf("Number of tries: %d\n",numTries);
...
}
resCode = DBDeactivateSQL();
See Also
DBFetchNext, DBFetchPrev, DBFetchRandom, DBActivateSQL,
DBDeactivateSQL, DBPutRecord
LabWindows/CVI SQL Toolkit Reference Manual
5-26
© National Instruments Corporation
Related documents
LabWindows/CVI SQL Toolkit Reference Manual
Informix CLI Programmer`s Manual, Version 2.8
Informix CLI Programmer`s Manual, Version 2.5
Getting Started Guide - ALTIBASE Customer Support
AspectMatlab - Sable Research Group
A+CAL User`s Manual - Microsoft Research
A PlusCal User`s Manual
Getting Started - Mimer SQL - Mimer Information Technology AB