.NETGURU
IsDefined
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngdata' list.


Collins, Mike
Anyone out there that knows Coldfusion as well, I need the .net equivalent.
I'm trying to read from a
objDataReader4.Item("myName") and it says there's no data there. I think I
need to do an equivalent of IsDefined("") around it. Anyone know?

-Mike Collins

***********************************************************************
NOTICE: This e-mail message and all attachments transmitted with it may contain legally privileged and confidential information intended solely for the use of the addressee. If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by telephone (404-881-7000) or by electronic mail (Click here to reveal e-mail address), and delete this message and all copies and backups thereof. Thank you.
=======================================================

Reply to this message...
 
    
Joel Mueller
If you're using VB, there's a built-in function called IsDBNull() that
may help you. It's also built into the DataReader object itself:

objDataReader4.IsDBNull(0)

This one only works with the column index (rather than the name) but it
probably performs marginally faster.

And of course, there's also System.Convert.IsDBNull()...

    - Joel

[Original message clipped]

Reply to this message...
 
    
Collins, Mike
Well, I tried that, but it didn't like it because there were no records to
read to see if it was null. What I ended up doing was creating an in
counter and looping of the recordset. If the counter equalled 0, it didn't
return results. It works, but there's got to be a better way.

-----Original Message-----
From: Joel Mueller [mailto:Click here to reveal e-mail address]
Sent: Friday, July 12, 2002 11:19 AM
To: aspngdata
Subject: [aspngdata] RE: IsDefined

If you're using VB, there's a built-in function called IsDBNull() that
may help you. It's also built into the DataReader object itself:

objDataReader4.IsDBNull(0)

This one only works with the column index (rather than the name) but it
probably performs marginally faster.

And of course, there's also System.Convert.IsDBNull()...

    - Joel

[Original message clipped]

| [aspngdata] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngdata.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

***********************************************************************
NOTICE: This e-mail message and all attachments transmitted with it may contain legally privileged and confidential information intended solely for the use of the addressee. If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by telephone (404-881-7000) or by electronic mail (Click here to reveal e-mail address), and delete this message and all copies and backups thereof. Thank you.
=======================================================

Reply to this message...
 
    
Nishat Syed
[Original message clipped]

_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com

Reply to this message...
 
 
System.Convert




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification