Using Recordcount with getrows?
Posted on 2003-03-10
I've been using getrows, but I just came accross a problem and that problem is if there are no records I get an error.
So is there a way to use recordcount or eof to check if there are records returned before the getrows is even executed and if not return an empty array.
Dim cnnGetRows As ADODB.Connection
Dim rstGetRows As ADODB.Recordset
Set cnnGetRows = New ADODB.Connection
Set rstGetRows = cnnGetRows.Execute("SELECT * FROM bookofsaleitems")
arrDBData = rstGetRows.GetRows(, , Array("Bookofsale", "category", "description", "endingdate", "endingtime", "ID", "itemname", "ourcommission", "photos", "price", "showonline", "soldonline", "startingdate", "startingtime", "taxable"))
Set rstGetRows = Nothing
Set cnnGetRows = Nothing
And I know that I can just leave the getrows parameters null, I just wanted my information returned in a certain order.