Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Null value in VB.Net
Message
From
19/09/2002 11:32:22
 
 
To
19/09/2002 02:02:10
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00701667
Message ID:
00702292
Views:
15
Yes, just include this:

if txt2 = ""
txt2 = Convert.DBNull

~~Bonnie



>thank you for your reply, in fact your suggestion i have tried it before, i know it can work but my situation is like this :
>
>(front end application)
>
>txt1.text = "Something"
>txt2.text = ""
>
>if txt2.text = "" then i want to convert it to NULL, then insert into table using following statement.
>
>sql = "Insert into tablename (field1,field2) values ('" & txt1.text & "', " _
> & "'" & txt2.text & "')"
>
>is it possible to do so ?
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform