where VbNullString in VB.Net?

T

Tark Siala

hi
lasr years i use vb6 to make my Application Database with ADO, this days i
use VB.NET to working with Database.
to know if Field contain null i use:

if recordset.field("data").value = vbnullstring then .....

but when i use VB.Net and working with Database this command not working,
any one know how do it in VB.NET?
 
R

rowe_newsgroups

hi
lasr years i use vb6 to make my Application Database with ADO, this days i
use VB.NET to working with Database.
to know if Field contain null i use:

if recordset.field("data").value = vbnullstring then .....

but when i use VB.Net and working with Database this command not working,
any one know how do it in VB.NET?

How about using DbNull instead?

Thanks,

Seth Rowe
 
H

Herfried K. Wagner [MVP]

Tark Siala said:
lasr years i use vb6 to make my Application Database with ADO, this days i
use VB.NET to working with Database.
to know if Field contain null i use:

if recordset.field("data").value = vbnullstring then .....

but when i use VB.Net and working with Database this command not working,
any one know how do it in VB.NET?

\\\
If ... Is DBNull.Value Then
...
End If
///

'IsDBNull' provides a wrapper around this comparison.
 
A

aaron.kempf

that has got to be the most ridiculous thing I've ever heard.

Is M$ going to change this yet again in the next version?

is UNNECESSARY CHANGE _SEXY_?
is UNNECESSARY CHANGE _NECESSARY_?
 
M

Michael C

ark Siala said:
hi
lasr years i use vb6 to make my Application Database with ADO, this days i
use VB.NET to working with Database.
to know if Field contain null i use:

if recordset.field("data").value = vbnullstring then .....

but when i use VB.Net and working with Database this command not working,
any one know how do it in VB.NET?

All the difference styles of nothing-ness (vbnullstring, nothing, emtpy,
missing and null) and gone except for nothing and DBNull.Value. DBNull.Value
is something (as opposed to nothing).

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top