-
Null Value
How do you test for a Null value in a returned recordset from SQL Server 7?
I have tried the following, with no luck:
If (rs("ExtPrice1") = NULL) Then
'some code that never gets executed
End If
What is the proper way to do this?
I have also tried all of the following:
If (rs("ExtPrice1") = "NULL") Then
'some code that never gets executed
End If
If (rs("ExtPrice1") = null) Then
'some code that never gets executed
End If
If (rs("ExtPrice1") = "null") Then
'some code that never gets executed
End If
If (rs("ExtPrice1") = Nothing) Then
'some code that never gets executed
End If
If (rs("ExtPrice1") = "") Then
'some code that never gets executed
End If
-
Re: Null Value
Try this
If IsNull(rs("ExtPrice1")) then
'Some code
End If
"Eric Lindros" <nobody@nobody.com> wrote:
>How do you test for a Null value in a returned recordset from SQL Server
7?
>
>I have tried the following, with no luck:
>
>If (rs("ExtPrice1") = NULL) Then
> 'some code that never gets executed
>End If
>
>What is the proper way to do this?
>
>I have also tried all of the following:
>
>If (rs("ExtPrice1") = "NULL") Then
> 'some code that never gets executed
>End If
>
>If (rs("ExtPrice1") = null) Then
> 'some code that never gets executed
>End If
>
>If (rs("ExtPrice1") = "null") Then
> 'some code that never gets executed
>End If
>
>If (rs("ExtPrice1") = Nothing) Then
> 'some code that never gets executed
>End If
>
>If (rs("ExtPrice1") = "") Then
> 'some code that never gets executed
>End If
>
>
-
Re: Null Value
Try this
If IsNull(rs("ExtPrice1")) then
'Some code
End If
"Eric Lindros" <nobody@nobody.com> wrote:
>How do you test for a Null value in a returned recordset from SQL Server
7?
>
>I have tried the following, with no luck:
>
>If (rs("ExtPrice1") = NULL) Then
> 'some code that never gets executed
>End If
>
>What is the proper way to do this?
>
>I have also tried all of the following:
>
>If (rs("ExtPrice1") = "NULL") Then
> 'some code that never gets executed
>End If
>
>If (rs("ExtPrice1") = null) Then
> 'some code that never gets executed
>End If
>
>If (rs("ExtPrice1") = "null") Then
> 'some code that never gets executed
>End If
>
>If (rs("ExtPrice1") = Nothing) Then
> 'some code that never gets executed
>End If
>
>If (rs("ExtPrice1") = "") Then
> 'some code that never gets executed
>End If
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks