kjoter
October 21st, 2001, 05:21 PM
Hello!
People have told me that the best way to do a controlled print of a recordset is to put the recordset data into a array, then read the array values into variables, and print selected information line by line in a txt file.
My problem is that i do not know how to get the data from the recordset into the 2D. array, and I do not know how to get array information into variable that i can do a print of... Do you have an example (with some code) of how this can be done?
Here is some of my code:
Dim rsNames As ADODB.Recordset
Dim sData As String
sData = ""
For Each fld In rsAddresses.Fields
sData = sData & fld.Name & ", "
Next
Do Until rsAddresses.EOF
sData = ""
For Each fld In rsAddresses.Fields
sData = sData & fld.Value & ", "
Next
rsAddresses.MoveNext
Print #1, sData; 'prints address
Loop
What i want is to get sData into an array, and then do a print from the array or something....
I'm thankful for all suggestions and tips.
People have told me that the best way to do a controlled print of a recordset is to put the recordset data into a array, then read the array values into variables, and print selected information line by line in a txt file.
My problem is that i do not know how to get the data from the recordset into the 2D. array, and I do not know how to get array information into variable that i can do a print of... Do you have an example (with some code) of how this can be done?
Here is some of my code:
Dim rsNames As ADODB.Recordset
Dim sData As String
sData = ""
For Each fld In rsAddresses.Fields
sData = sData & fld.Name & ", "
Next
Do Until rsAddresses.EOF
sData = ""
For Each fld In rsAddresses.Fields
sData = sData & fld.Value & ", "
Next
rsAddresses.MoveNext
Print #1, sData; 'prints address
Loop
What i want is to get sData into an array, and then do a print from the array or something....
I'm thankful for all suggestions and tips.