954,566 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

passing the recordset data into an Array

Hi,

Please help me in passing the data from recorset to an array..


Thanks in advance..

zafs
Newbie Poster
2 posts since Oct 2006
Reputation Points: 10
Solved Threads: 0
 

information u provided is very less, but hope this will help
lets consider
"Con" is ur dbase cnnection
Dim Array1() --->keep it open for dynamic use
then
set Rs=con.execute("select * from tablename") --> it is ur table recordet
linecount=0
while not Rs.eof
linecount=linecount+1
redim preserve Array1(LineCount)
Array(1)=rs.fields("fieldname")
Rs.movenext
wend

now Array1 is your array and as it is dynamic so no need to worry about the no of records or array size as well

noman78
Light Poster
40 posts since Nov 2005
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You