|
-
Apr 30th, 2004, 10:29 AM
#1
Thread Starter
Member
null datarow, better way?
Currently when I am querying a table, I assign a datarow the values I requested. If the search turns up null, I resolve it -a- la - ghetto. There has to be a better way
VB Code:
dim rowInput as datarow
dim tblIptval as new datatable
Try
rowInput = tblIptVal.Select("CID = " & CID )(0)
Catch
'no records
End Try
Last edited by SeaCapnJ; Apr 30th, 2004 at 04:05 PM.
-
May 2nd, 2004, 01:20 PM
#2
Fanatic Member
I was l;ooking for a solution also and foun this on MSDN.
Much ADO About Nothing
But I would still prefer a simpler method ....
Using VB.NET 2003/.NET 1.1/C# 2.0
http://del.icio.us/rajoo
Blow your mind, smoke gunpowder
Ashes to ashes, dust to dust
If God won't have you, the devil will. - Author unknown
Don't follow me, I'm lost too ...
-
May 3rd, 2004, 08:13 AM
#3
Frenzied Member
Very interesting article... but if I get the error "attempting to read data when there is no data present" when I access a datareaders itemcollection, does that mean Im accessing a null field or that the entire datarow is scrap...?
kind regards
Henrik
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
|
Click Here to Expand Forum to Full Width
|