PDA

Click to See Complete Forum and Search --> : Run-time error '94'


Linda
Nov 10th, 1999, 12:40 AM
I didn't get any error message when I tried to receive empty recordset in VB project. But when I compile this to an exe file and made a search in an empty recordset, I got the below error message:
Run-time error '94': Invalid use of Null

I use VB6 and ADO 2.0 library, APEX True DBGrid 6.0(OLEDB).

Hope anyone here can help me.

JHausmann
Nov 10th, 1999, 08:15 AM
More likely than not the problem is being caused by the program referencing a non-character based field (like date/time or numeric fields). You don't explicitly say so but you're probably using a bound-control.You might consider checking, before accessing the DBGrid, if there are no records in the dataset and giving the user the option of adding a new record or not using the control...

Linda
Nov 10th, 1999, 08:28 AM
I found out the reason. It's related to the DBGrid. I closed the recordset once I got empty recordset and it works well now.