470,848 Members | 1,898 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,848 developers. It's quick & easy.

How to assign a null value to the Column in the Database from VB.N

I want to assign null value to a column in the database which is decalred as
an integer from VB.net...

Is there any specific keyword like vbNull as in vb 6.0.
--
Peter...
Nov 21 '05 #1
3 4525
Do you mean System.DBNull.Value?

Chris.

"Prabhudhas Peter" wrote:
I want to assign null value to a column in the database which is decalred as
an integer from VB.net...

Is there any specific keyword like vbNull as in vb 6.0.
--
Peter...

Nov 21 '05 #2
"Prabhudhas Peter" <Pr*************@discussions.microsoft.com> schrieb:
I want to assign null value to a column in the database which is decalred
as
an integer from VB.net...

Is there any specific keyword like vbNull as in vb 6.0.


Assign 'SqlInt32.Null' to the 'Value' property of your 'SqlInt32', if you
are using the 'Sql*' types. For a more general replacement, take a look at
'DBNull.Value'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3
Something like this:
myvalue = DBNull.Value

That will set the column's value (myvalue in this case) to DBNull.Value.

james

"Prabhudhas Peter" <Pr*************@discussions.microsoft.com> wrote in message
news:F7**********************************@microsof t.com...
I want to assign null value to a column in the database which is decalred as
an integer from VB.net...

Is there any specific keyword like vbNull as in vb 6.0.
--
Peter...

Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

26 posts views Thread by Agoston Bejo | last post: by
10 posts views Thread by Bodza Bodza | last post: by
5 posts views Thread by tshad | last post: by
2 posts views Thread by Jim McGivney | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.