Home All Groups Group Topic Archive Search About

Reading a .DAT file with the Microsoft Text Driver

Author
5 Dec 2006 6:44 PM
zacks
I have an application that uses the Microsoft Text Driver to read ASCII
delimited files. Most of the time these files are either CSV or TXT
file extension. Recently I needed to read some that had a DAT file
extension. When I tried to open it with the Microsoft Text Driver an
exception was thrown that said the file was already in use. But if I
simply rename the file with a TXT file extension the application opens
and reads the file just fine.

What gives?

Author
5 Dec 2006 11:41 PM
Charlie Brown
Is there a special reason for using the text driver versus a .net built
in method?

za***@construction-imaging.com wrote:
Show quoteHide quote
> I have an application that uses the Microsoft Text Driver to read ASCII
> delimited files. Most of the time these files are either CSV or TXT
> file extension. Recently I needed to read some that had a DAT file
> extension. When I tried to open it with the Microsoft Text Driver an
> exception was thrown that said the file was already in use. But if I
> simply rename the file with a TXT file extension the application opens
> and reads the file just fine.
>
> What gives?
Author
6 Dec 2006 1:23 PM
zacks
Charlie Brown wrote:
> Is there a special reason for using the text driver versus a .net built
> in method?

Ignorance?

When developing the application I was told to use the text driver
because that would make it easier to modify the application later to
add other ODBC data sources.


Show quoteHide quote
>
> za***@construction-imaging.com wrote:
> > I have an application that uses the Microsoft Text Driver to read ASCII
> > delimited files. Most of the time these files are either CSV or TXT
> > file extension. Recently I needed to read some that had a DAT file
> > extension. When I tried to open it with the Microsoft Text Driver an
> > exception was thrown that said the file was already in use. But if I
> > simply rename the file with a TXT file extension the application opens
> > and reads the file just fine.
> >
> > What gives?