Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > myArray = recordset.getrows

Reply
Thread Tools

myArray = recordset.getrows

 
 
dotnettester
Guest
Posts: n/a
 
      03-01-2006
Hi,

would this code give an EOF or BOF error if there are no rows in the
recordset? or the array myArray would be just null?

Thnx.


 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      03-01-2006
dotnettester wrote:
> Hi,
>
> would this code give an EOF or BOF error if there are no rows in the
> recordset?

Yes. That is why I always do this:

dim myArray
recordset.open ...
if not recordset.eof then myArray = recordset.getrows
recordset.close:set recordset=nothing
connection.close: set connection=nothing

if isarray(myArray) then
'process it
else
'report that there were no records
end if

Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
when 'myArray * 'myObject' is not equal to 'myObject' * 'myArray' Duim Python 2 08-19-2010 08:56 AM
Compiler not recognizing myArray[0]; Mike B C++ 2 06-07-2005 11:05 PM
redim preserve myArray(i) ASP General 2 01-17-2004 05:00 PM
MyArray[3][-2] fails (quelle surprise), how to detect this? Fabian Javascript 13 11-18-2003 03:25 PM
myArray instanceof Array fails after passing to a different page John MacIntyre Javascript 4 09-24-2003 10:07 PM



Advertisments