WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ODBC
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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   cc
The 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:   W12542
Filename:   qFetch with Empty Cell.txt
File Created: 2017:07:28:13:58:33
Last Updated: 1999:04:15:16:47:56