473,498 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

question about checking for null in query results

I have a query result set that returns some fields with null length what is
the easiest way to chek for this. This is what i'm trying but it generated a
runtime error:
If (dtrSlb("slbDesc1").IsdbNull()) Then
Else
txtDescription.Text = dtrSlb("slbDesc2")
End If
this returns: Public member 'IsdbNull' on type 'DBNull' not found.
I believe this can be done in VB.NET, but what about here in asp.net?

Nov 19 '05 #1
2 1468
if not dtrSlb("slbDesc1") IS DbNull.Value then
txtDescription.Text = dtrSlb("slbDesc2")
end if

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Kurt Schroeder" <Ku***********@discussions.microsoft.com> wrote in message
news:4F**********************************@microsof t.com...
I have a query result set that returns some fields with null length what is the easiest way to chek for this. This is what i'm trying but it generated a runtime error:
If (dtrSlb("slbDesc1").IsdbNull()) Then
Else
txtDescription.Text = dtrSlb("slbDesc2")
End If
this returns: Public member 'IsdbNull' on type 'DBNull' not found.
I believe this can be done in VB.NET, but what about here in asp.net?

Nov 19 '05 #2
Thank You. I knew it had to be something simple.
IOU1
kes

"Karl Seguin" wrote:
if not dtrSlb("slbDesc1") IS DbNull.Value then
txtDescription.Text = dtrSlb("slbDesc2")
end if

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Kurt Schroeder" <Ku***********@discussions.microsoft.com> wrote in message
news:4F**********************************@microsof t.com...
I have a query result set that returns some fields with null length what

is
the easiest way to chek for this. This is what i'm trying but it generated

a
runtime error:
If (dtrSlb("slbDesc1").IsdbNull()) Then
Else
txtDescription.Text = dtrSlb("slbDesc2")
End If
this returns: Public member 'IsdbNull' on type 'DBNull' not found.
I believe this can be done in VB.NET, but what about here in asp.net?


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

38
4999
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find...
4
2642
by: Orion | last post by:
Hi, This is kind of last minute, I have a day and a half left to figure this out. I'm working on a project using ms-sqlserver. We are creating a ticket sales system, as part of the system, I...
2
2703
by: Ellen Manning | last post by:
Using A2K. In my table I have the field "Grant" which can have a value or be null. I have a query that counts the number of records and has a Where clause on the Grant field. The query won't...
14
4019
by: deko | last post by:
For some reason this does not seem to be working... Am I missing something basic? Dim rst As DAO.Recordset Dim db As DAO.Database Set db = CurrentDb Set rst = db.OpenRecordset("qryEmailS") '...
30
2200
by: Michael B Allen | last post by:
I have a general purpose library that has a lot of checks for bad input parameters like: void * linkedlist_get(struct linkedlist *l, unsigned int idx) { if (l == NULL) { errno = EINVAL;...
2
3391
by: Chris | last post by:
Hi, I have an SQL Query that loads a SQLDataReader object. The returned record has bit datatype columns that I use to provide true/false values. I can't get a definite answer googling on...
5
2104
by: Stan SR | last post by:
Hi, Some newbie questions.. :-) First, what is the namespace to use for the Cache class ? When I use this bit of code I get an error if (Cache==null) Cache.Insert("myUserList",userlist);...
8
2787
by: rbg | last post by:
I did use query plans to find out more. ( Please see the thread BELOW) I have a question on this, if someone can help me with that it will be great. In my SQL query that selects data from table,...
3
2298
by: bob laughland | last post by:
Hi All, I have a SQL query like this (I have tried to break the problem down to simplify it), select rowid from table where name in ('a', 'b', 'd') group by rowid Here is an example of data...
0
7121
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6993
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7162
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7197
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6881
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4899
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4584
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
287
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.