Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reading text file
Message
De
01/07/2003 22:01:16
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Titre:
Reading text file
Divers
Thread ID:
00805927
Message ID:
00805927
Vues:
59
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform