|
-
Dec 13th, 2006, 05:42 PM
#1
Re: Dazed and Confused!
You shouldn't be using a DataReader to get a single value. You should be calling the ExecuteScalar method of your Command. It will return an Object reference that you can cast as an Integer using CInt.
Now, there is nothing in that code that will throw an IndexOutOfRangeException as far as I can see. Are you using varMin somewhere later in your code, as an index into an array or collection? That's where that type of exception is likely to be thrown. If that's the case than your logic must be flawed because you can't possibly have a negative index in an array or collection.
-
Dec 18th, 2006, 04:11 PM
#2
Thread Starter
Junior Member
Re: Dazed and Confused!
Thanks Guys, it's working now. I greatly appreciate it!
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
|