Null value with VB.NET
Visual Basic
2
Posts
2
Posters
0
Views
1
Watching
-
I put nothing like a paramter, I all the time have an error.. **************************** InsertFunction(1, Nothing) Public Shared Function InsertFunction(ByVal i as Integer, ByVal m as String) **************************** How can I do to put nothing and have a NULL value in the database ? Thanks for the help. Julien
-
I put nothing like a paramter, I all the time have an error.. **************************** InsertFunction(1, Nothing) Public Shared Function InsertFunction(ByVal i as Integer, ByVal m as String) **************************** How can I do to put nothing and have a NULL value in the database ? Thanks for the help. Julien
Try using DBNull.Value when writing to your database. My latest article: GBVB - Converting VB.NET code to C#