LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
raj raj is offline
external usenet poster
 
Posts: 32
Default ADO & semicolon delimited text file?

Hello, I hope someone can help me with this issue, please.

I need to open a large semi-colon delimited text file into
a recordset using ADO.

Is this possible? If so, how do I make ADO aware that the
file is "semi-colon" delimited?

Right now, my code does not recognize this delimeter and
imports all the data into the recordset as one column
(NOTE: there are too many rows to open into a spreadsheet).

Your example code would be most appreciated, thanks in
advance.

If needed, my code so far is below:

Set cnText = New ADODB.Connection
cnText.CursorLocation = adUseClient
cnText.ConnectionString = "PROVIDER=MSDASQL;DRIVER=
{MICROSOFT TEXT DRIVER (*.TXT; *.CSV)};DBQ=" & argFilePath
& ";"
cnText.Open

strSQL = "SELECT * FROM " & argFileName & ";"
Set rsText = New ADODB.Recordset
rsText.MaxRecords = 0
rsText.Open Source:=strSQL, ActiveConnection:=cnText,
CursorType:=adOpenForwardOnly, LockType:=adLockReadOnly,
Options:=adCmdText

Your example code would be most helpful, TIA.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert column data to semicolon delimited text string Richard RE Excel Worksheet Functions 1 September 5th 06 03:03 PM
Saving Excel sheet as a semicolon delimited file (.csv) e_dog95 Excel Discussion (Misc queries) 1 February 18th 06 11:02 PM
Converting Excel data into semicolon delimited text file danmcgov Excel Discussion (Misc queries) 1 April 14th 05 04:30 PM
Export excel file to semicolon delimited text file capitan Excel Discussion (Misc queries) 5 April 7th 05 03:06 AM
Open delimited text file to excel without changing data in that file zohanc Excel Programming 1 October 3rd 03 01:06 AM


All times are GMT +1. The time now is 04:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"