Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to work with .CSV fiels using ADO?

Status
Not open for further replies.

jforero

MIS
Oct 10, 2003
12
US
Hi, I have some information in a .csv file. Can I open that file using ADO to manipulate this information?

I want to work with the recordset and sort the information in any way to create reports.

How would be the code to open a .csv file?

Any help appreciated.


Thanks, Jose.
 
jforero, welcome to Te-Tips to get the most from these forums you should read. faq222-2244

Dim adoConn As New ADODB.Connection
Dim adors as new Adodb.Recordset adoConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & strPath & ";" & _
"Extended Properties=""text;HDR=Yes;FMT=Delimited"""

adoRS.Open "Select * From " & strFile & "", adoConn, _
adOpenStatic, adLockReadOnly, adCmdText

"Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top