I looping recordset....
I need to create a string deleimited from ";" for each row in table, but the code dont work correct!
NEWSQL1 = ""
NEWSQL = ""
I = 2
Do While Not RST.EOF = True
For J = 0 To RST.Fields.Count - 1
NEWSQL = Trim(RST.Fields(J).Value)
NEWSQL1 = NEWSQL & ";"
Debug.Print NEWSQL1
Next J
Print #1, NEWSQL
RST.MoveNext
I = I + 1
Loop
Note:
In other case is required the last ";" if i want to import in access datatable the txt file?
Last edited by luca90; Jul 17th, 2010 at 01:44 PM.
Seriously? This is pretty clear in the documentation.
Code:
Private Function DumpRecordset() As String
With rsData
.MoveFirst
DumpRecordset = .GetString(adClipString, , ";", vbNewLine, "*null*")
End With
End Function
Seriously? This is pretty clear in the documentation.
Code:
Private Function DumpRecordset() As String
With rsData
.MoveFirst
DumpRecordset = .GetString(adClipString, , ";", vbNewLine, "*null*")
End With
End Function
good code ... but i work arround a few records.
Really have 3/4 millions of records and the code go in error "not enauhght memory"
hI friend, sorry for delay... you tips work fine! Tks.
But for you, have sense instead to use only the ; to devide the records in txt file, or i need to use ";", similar: