If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > how to pull the recordset to a array?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-23-03, 10:59
cindymandy cindymandy is offline
Registered User
 
Join Date: Oct 2003
Posts: 3
Question how to pull the recordset to a array?

Hi,

I'm trying to get certain record into an array like this.

Function GetItemParameters(iItemID)
Dim aParameters
rsTemp.Open "Select * From list Where pid = " & iItemID
If Not rsTemp.EOF Then
aParameters = Array(
rsTemp("productThumbnail"),
rsTemp("productName"),
rsTemp("productPrice")
)
GetItemParameters = aParameters
End If
rsTemp.Close
End Function

And then when I call the aParameters, I'm getting this error

Type mismatch: 'aParameters'

So, I think I'm having syntax problem with the array. I know that it would work if I put in

aParameters = Array("1","2","3")

I think it's not working because I'm missing the quotation mark but then it wouldn't understand that it's a record and not text. What's the right syntax to use here?

Thanks
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On