By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,234 Members | 1,877 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,234 IT Pros & Developers. It's quick & easy.

Checking for Null Database Values

P: n/a
i want to check if the following field is null.

Dim rsAssets As New ADODB.Recordset

rsAssets.Fields("SubIcon").Value)

IsNull is no longer supported, so what should I use?

Thanks

Vayse


Nov 21 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
"Vayse" <Va***@nospam.nospam> wrote in message news:O%******************@TK2MSFTNGP14.phx.gbl...
i want to check if the following field is null.

Dim rsAssets As New ADODB.Recordset

rsAssets.Fields("SubIcon").Value)

IsNull is no longer supported, so what should I use?

Thanks

Vayse


Try IsDbNull().

--
Al Reid
Nov 21 '05 #2

P: n/a
Thats it, thanks.
"Al Reid" <ar*****@reidDASHhome.com> wrote in message
news:uy**************@tk2msftngp13.phx.gbl...
"Vayse" <Va***@nospam.nospam> wrote in message
news:O%******************@TK2MSFTNGP14.phx.gbl...
i want to check if the following field is null.

Dim rsAssets As New ADODB.Recordset

rsAssets.Fields("SubIcon").Value)

IsNull is no longer supported, so what should I use?

Thanks

Vayse


Try IsDbNull().

--
Al Reid

Nov 21 '05 #3

P: n/a
Convert.DBNull

"Vayse" <Va***@nospam.nospam> wrote in message
news:O%******************@TK2MSFTNGP14.phx.gbl...
i want to check if the following field is null.

Dim rsAssets As New ADODB.Recordset

rsAssets.Fields("SubIcon").Value)

IsNull is no longer supported, so what should I use?

Thanks

Vayse

Nov 21 '05 #4

P: n/a
Not quite. Convert.DBNull is a constant representing "database null" while Convert.IsDBNull() is the test for it.

--
Al Reid

"Pipo" <No****@me.com> wrote in message news:OA**************@TK2MSFTNGP14.phx.gbl...
Convert.DBNull

"Vayse" <Va***@nospam.nospam> wrote in message
news:O%******************@TK2MSFTNGP14.phx.gbl...
i want to check if the following field is null.

Dim rsAssets As New ADODB.Recordset

rsAssets.Fields("SubIcon").Value)

IsNull is no longer supported, so what should I use?

Thanks

Vayse


Nov 21 '05 #5

P: n/a
"Al Reid" <ar*****@reidDASHhome.com> schrieb:
Not quite. Convert.DBNull is a constant representing "database null"
while Convert.IsDBNull() is the test for it.


However, you could use 'If ... Is DBNull.Value Then...' instead of
'IsDBNull'.

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

Nov 21 '05 #6

P: n/a
if rsAssets.Fields("SubIcon") = convert.dbnull then

end if
"Al Reid" <ar*****@reidDASHhome.com> wrote in message
news:ep**************@TK2MSFTNGP09.phx.gbl...
Not quite. Convert.DBNull is a constant representing "database null" while Convert.IsDBNull() is the test for it.
--
Al Reid

"Pipo" <No****@me.com> wrote in message

news:OA**************@TK2MSFTNGP14.phx.gbl...
Convert.DBNull

"Vayse" <Va***@nospam.nospam> wrote in message
news:O%******************@TK2MSFTNGP14.phx.gbl...
i want to check if the following field is null.

Dim rsAssets As New ADODB.Recordset

rsAssets.Fields("SubIcon").Value)

IsNull is no longer supported, so what should I use?

Thanks

Vayse



Nov 21 '05 #7

P: n/a
Thanks Herfried,

That was what I meant.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:OA**************@TK2MSFTNGP14.phx.gbl...
"Al Reid" <ar*****@reidDASHhome.com> schrieb:
Not quite. Convert.DBNull is a constant representing "database null"
while Convert.IsDBNull() is the test for it.


However, you could use 'If ... Is DBNull.Value Then...' instead of
'IsDBNull'.

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

Nov 21 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.