PDA

Click to See Complete Forum and Search --> : Invalid use of Null!


Zvonko
Aug 23rd, 2000, 09:43 AM
Hello!

I'm developing a database related program and when a field that I wanna retrieve from DB is empty, it returns error 94 (Invalid use of null).
How can I avoid this error and retrieve data from database? Is it enough to write this statement before loading data from database:
On Error Resume Next

Zvonko

Stevie
Aug 23rd, 2000, 09:53 AM
If for example you were retrieving a field called Employee into a text box called txtEmployee then ...


txtEmployee.Text = "" & rs!Employee


The "" would stop any error due to Employee being empty.

kovan
Aug 23rd, 2000, 10:23 AM
try


if NOT (rs!Employee) then txtEmployee.text = rs!Employee

kovan
Aug 23rd, 2000, 10:24 AM
if NOT ISNULL(rs!Employee) then txtEmployee.text = rs!Employee