Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where did my nulls go???

Status
Not open for further replies.

jjwild

Programmer
Sep 7, 2001
115
US
I have a VB 6.0 app running against a SQL Server database.

It has been running fine until recently when something changed and I do not know what caused the change.

When I do an .AddNew to a recordset, it used to set all fields in the recordset to Null. I sometimes used this fact in called subroutines to know that certain initializing work needed to be done.

However, now it sets all fields to an empty string, including dates and numeric values. IsNull is false, Len() returns 0 and the immediate window shows no value for the item.

What could be causing this?

P.S. I have figured out that what I should have done was see if the EditMode property of the recordset was equal to adEditAdd. I have now done this but would still like to know what might have happened. Thanks.
 
All I can think of is that the default values had been set to "" in the table, but then someone would have had to change the default value in the table for that to occur.

Pete Vickerstaff - Hedra Software
 
Pete-

You were correct. I forgot we had done this and it only mattered to this one area of code.

Thanks,

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top