qFetch with Empty Cell not Working Correctly
Keywords: qFetch Empty Cell returns incorrect values
Question:
From the documentation in the ODBC Extender help file, it looks like qGetData returns only a single cell in a result set. I'm having a problem when one of my cells is empty, e.g.ColA ColB ColC aa ab ac ba bc ca cb ccThe values I get for the WIL variable bound to ColB differ depending on whether I use qFetch or qGetData. When using qGetData, I get first "ab" then "" then "cb", which is correct. However, when using qFetch I get first "ab" then "ab" then "cb", which is incorrect -- the second qFetch should return a null string for the ColB variable.Since qGetData works as expected, I can use it to accomplish my task. I just can't figure out why qFetch is responding differently. The most likely explanation is, of course, that there's something peculiar in my code. I tried several tests but haven't been able to find anything wrong with it yet so I thought it might be a bug in the underlying qFetch function.
Answer:
This has been fixed in versions of the ODBC DLL after January 7, 1999, so check that you have the latest DLL.
Article ID: W12542Filename: qFetch with Empty Cell.txt