|
-
Dec 9th, 2001, 01:36 PM
#1
Thread Starter
Lively Member
sql & arrays
i have posted like 3-4-5 time asking the same question but no one seems to anser it!
i have made a connection to my database(sql2k), redimed my arrrays
now all i need is the code to take all the infomation in a columb and dump it into a array, so
i have a colubm with 12 cells, my array size is 12
one cell to a slot in the array
ergo
cell1 in stock code columb------>array1(0)
cell2 in stock code columb------>array1(1)
i could really do with help on this please help me im gonna be in big trouble if i dont get help
-
Dec 10th, 2001, 04:42 AM
#2
Hyperactive Member
Do a recordcount, after you have opened the recordset you use the redim function and put the data in the array:
VB Code:
dim YourArray() as string
dim intCntr as integer
dim i as integer
intCnt = YourRecordset.recordcount
Redim YourArray(intCnt)
YourRecordset.movefirst
for i = 1 to intCnt
YourArray(i) =YourRecordset("YourField")
YourRecordset.movenext
next i
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
|