passing the recordset data into an Array

Reply

Join Date: Oct 2006
Posts: 2
Reputation: zafs is an unknown quantity at this point 
Solved Threads: 0
zafs zafs is offline Offline
Newbie Poster

passing the recordset data into an Array

 
0
  #1
Nov 16th, 2006
Hi,

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


Thanks in advance..
Reply With Quote Quick reply to this message  
Join Date: Nov 2005
Posts: 40
Reputation: noman78 is an unknown quantity at this point 
Solved Threads: 0
noman78's Avatar
noman78 noman78 is offline Offline
Light Poster

Re: passing the recordset data into an Array

 
0
  #2
Nov 16th, 2006
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC