Browse by category:
|| | ||
When checking the output of an RWDBBulkReader, some of the data which should be null in the receiving RWDBVector contains incorrect, non-null values.
This issue is most often caused by a program that does not check for null values in the receiving RWDBVector, RWDBDateVector or RWDBStringVector objects when processing the results of an RWDBBulkReader.
To avoid this issue in your program, check each element of the RWDBVector, RWDBDateVector or RWDBStringVector objects mapped to a column in your database the allows NULL values. An example of this checking can be found in the following code sample.
RWDBTable mlTable1 = mlResult1.table();
RWDBBulkReader mlBReader = mlTable1.bulkReader(mlConnection1);
RWDBVector<int> nNumber (1);
RWDBStringVector szText (1000, 1);
mlBReader << nNumber << szText;
int nRead = 0;
while (nRead = mlBReader())
cerr << "Read " << nRead << " record(s)" << endl;;
for (int i = 0; i < nRead ; i++)
cout << " nNumber[" << i << "] = " << nNumber[i]
<< " | szText[" << i << "] = " << (szText.isNull(i) ? "NULL" : szText[i])
<< " | Len " << szText.length() << endl << endl;
|Command line builds for Threads 2.0.1 on Solaris7 with SunPro 4.2||Improving the performance of an application that uses a lot of...|