-
null fields insert Q
Hi,
I'm trying to insert records to my dbase from my web app. I can get all the data into the appropriate fields...as long as there's an entry. I was trying to do a simple if statement to catch fields left blank, I just can't remember what to do with it when I do!
Code:
dim nl as System.dbNull
If (Name = "") Then
Name = nl.ToString
sql_addStaticValues += " ' " + Name + " ',"
End If
I know you have to insert a dbNull instead or an empty value but am just unsure how to do it.
Thanks
-
-
sorry...where?
It just keeps saying that it's not compatible with the string value