Link to home
Start Free TrialLog in
Avatar of nomar2
nomar2

asked on

How to handle the syntax for a Null date field in a SQL SERVER database using VB.NET

I have a SQL statement..

 Dim str As String = "UPDATE tExpress SET dtBagReturned = '" & lDate & "' WHERE iCustomerID = " & lnCustomerID

I only want to update the table if dtBagReturned is empty...how would the syntax look for a null date field in  a SQL server database..

Somebody me told a empty date field defaults to a value of # 01/01/01 12:00:00 AM #...so it is not realy empty..

I'm confused on how to change my sql to reflect the " empty" date field

Anyhelp or insight would be much appreciated...
           
Avatar of mydasx
mydasx

compare your result to SQLDATETIME.NULL
ASKER CERTIFIED SOLUTION
Avatar of bnaveke
bnaveke

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial