I am trying to open text file with ADO:
Dim oConn as ADODB.Connection
Dim oRs as ADODB.Recordset
dim mRecCount as integer
dim mRec as integer
dim mREcord as string
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\somepath\;" & _
"Extended Properties=""text;HDR=Yes;FMT=Delimited"""
u
oRs.Open "Select * From MyTextFile.txt", oConn, _
adOpenStatic, adLockReadOnly, adCmdText
oRs.movelast
mReccount=oRs.RecCount-1
oRs.Movefirst
For mrec=0 to mreccount
mrecord = ors! '---> My questiion is here:
'---> what's the fieldname should I use ..
oRs.movenext
next mrec
My question is: how do I call the record ? what the fieldname should I use?
many thanks
Regards
Winan
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only