By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,184 Members | 1,429 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,184 IT Pros & Developers. It's quick & easy.

override Registry Text File Format setting for driver (CSVDelimite

P: n/a
In the Registry at

HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Jet \ 4.0 \ Engines \ Text

the default key for Text Format is:

"Format" = "CSVDelimited"

I can use the following OleDB connection string with an OleDB dataAdapter to
read a comma delimited text file when "Format" = "CSVDelimited"

conOle.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\1A\;Extended Properties=""Text;HDR=yes;FMT=Delimited"""

But if the text file is tab delimited - my connection string reads the
entire row into one field per row (no column delimiting). If I change the
Registry setting to

"Format" = "TabDelimited"

then I can read the tab delimited text file with an OleDB dataAdapter
correctly. But I also want to be able to read a pipe | delimited text file
using an OleDB dataAdapter. I tried setting "Format" = "Delimited" but got
an error message in my app that said the Registry had an invalid key. I
tried "," for the comma delimited file instead of CSVDelimited , but got the
same "Invalid Registry Key..." error.

I was following the documentation at

http://msdn.microsoft.com/en-us/library/bb177651.aspx

for initializing the Text Data source driver which includes "Delimited" as
one of the keys that can be used. But that did not work.

Is there a generic setting I can place in the Registry so that I can use the
Delimeter of my choice? Or is there a way to override the Registry setting
from my application? If there is not - then is there a way (some key) I
could use a semicolon ; or pipe | as a delimiter for the OleDB DataAdapter?

Any information appreciated.

Thanks,
Rich

Aug 20 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
OK. I figured out how to use a delimiter of my choice as follows:

Format = Delimited(,)

or

Format = Delimited(|)

or

Format = Delimited(;)
....

But I still have to modify the Registry for these settings. I can perform
these modifications from the app of course. But is there a way to override
the Registry values so that I don't have to modify the registry settings?
"Rich" wrote:
In the Registry at

HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Jet \ 4.0 \ Engines \ Text

the default key for Text Format is:

"Format" = "CSVDelimited"

I can use the following OleDB connection string with an OleDB dataAdapter to
read a comma delimited text file when "Format" = "CSVDelimited"

conOle.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\1A\;Extended Properties=""Text;HDR=yes;FMT=Delimited"""

But if the text file is tab delimited - my connection string reads the
entire row into one field per row (no column delimiting). If I change the
Registry setting to

"Format" = "TabDelimited"

then I can read the tab delimited text file with an OleDB dataAdapter
correctly. But I also want to be able to read a pipe | delimited text file
using an OleDB dataAdapter. I tried setting "Format" = "Delimited" but got
an error message in my app that said the Registry had an invalid key. I
tried "," for the comma delimited file instead of CSVDelimited , but got the
same "Invalid Registry Key..." error.

I was following the documentation at

http://msdn.microsoft.com/en-us/library/bb177651.aspx

for initializing the Text Data source driver which includes "Delimited" as
one of the keys that can be used. But that did not work.

Is there a generic setting I can place in the Registry so that I can use the
Delimeter of my choice? Or is there a way to override the Registry setting
from my application? If there is not - then is there a way (some key) I
could use a semicolon ; or pipe | as a delimiter for the OleDB DataAdapter?

Any information appreciated.

Thanks,
Rich
Aug 20 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Browse more Visual Basic .NET Questions on Bytes