469,626 Members | 1,043 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

override Registry Text File Format setting for driver (CSVDelimite

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
1 9636
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.

Similar topics

1 post views Thread by Omer Ahmad | last post: by
17 posts views Thread by Sam | last post: by
6 posts views Thread by JOSII | last post: by
4 posts views Thread by =?Utf-8?B?U3RldmVU?= | last post: by
12 posts views Thread by =?Utf-8?B?YXVsZGg=?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.