|
-
June 15th, 2001, 06:01 PM
#1
EOF Problem with GetRows()
I have an ASP Component that makes a call to a SQL 7 DB using ADO. I want to return the records using GetRows(). I can do this fine. The problem I have is when there are no records. The ASP page is expecting a 2 dimensional array of records. How can I tell my ASP page that there are no records? Here is my VB Code:
public Function MyFunction() as Variant
'... db connection is opened
'execute stored procedure
oRs.Open oCmd
'make sure we have records
If oRs.BOF Or oRs.EOF then
'can't return it like this. ASP expects array
ProductFrontDisplay = ""
else
ProductFrontDisplay = oRs.GetRows
End If
End Function
My ASP code looks like:
'...open dll
arrTest = oConn.MyFunction
'...close dll
'need to check for EOF here, not sure how
For i = 0 To UBound(arrTest, 2)
'use records
Next
Any help would be greatly appreciated. Thanks.
-
June 28th, 2001, 06:30 AM
#2
Re: EOF Problem with GetRows()
Can you not just use Erase ProductFrontDisplay so that there are no elements in the array
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
|