Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading text file
Message
From
01/07/2003 22:01:16
 
 
To
All
General information
Forum:
Visual Basic
Category:
Other
Title:
Reading text file
Miscellaneous
Thread ID:
00805927
Message ID:
00805927
Views:
58
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
Map
View

Click here to load this message in the networking platform