ODBC ASCII Driver - VS.NET(vb) 2003

  • Thread starter Thread starter CJ Taylor
  • Start date Start date
C

CJ Taylor

Alright ya'll,

lets see if we can solve this stupid error.

I have a "server" I am writing (a gateway program that monitors programs in
a legacy system that writes out 'text' files to a shared drive).

So, in the first development environment, it worked fine, Windows XP pro,
fine. Now I'm in my test environment, (VMWare 4.0 on my machien, VS.NET
2003) i keep getting an ODBCException on the Fill (using an ODBC Driver,
ASCII, Tab deliniated, etc.)

The message is


Message "ERROR [42S02] [Microsoft][ODBC Text Driver] The Microsoft Jet
database engine could not find the object 'RTDXWRK.TXT'. Make sure the
object exists and that you spell its name and the path name correctly."
String


Yet it finds it in a few lines of code above. I have a directory window
open, works fine. I have my connection string set in the web.config for the
ODBC Ascii driver, thats fine. worked fine in the development environemtn,
but now.. not dice.

clues?

Thanks,
CJ
 
So, in the first development environment, it worked fine, Windows XP pro,
fine. Now I'm in my test environment, (VMWare 4.0 on my machien, VS.NET
2003) i keep getting an ODBCException on the Fill (using an ODBC Driver,
ASCII, Tab deliniated, etc.)
The message is

Message "ERROR [42S02] [Microsoft][ODBC Text Driver] The Microsoft Jet
database engine could not find the object 'RTDXWRK.TXT'. Make sure the
object exists and that you spell its name and the path name correctly."
String


Yet it finds it in a few lines of code above. I have a directory window
open, works fine. I have my connection string set in the web.config for the
ODBC Ascii driver, thats fine. worked fine in the development environemtn,
but now.. not dice.

Are you sure the source directory is right in the Connection String? The
other thing is that sometimes in the ODBC Text Driver you are forced to
specify what file extentions it should recognize (ie. TXT, ASC, etc...), do
you have that option (Click options, then is should show an extention list)?

~
Jeremy
 
Hey Jeremy,

Yeah I got all that set right..

Like I said, when it was local, worked fine... now its not, doesn't work
fine...

=)


Jeremy Cowles said:
So, in the first development environment, it worked fine, Windows XP pro,
fine. Now I'm in my test environment, (VMWare 4.0 on my machien, VS.NET
2003) i keep getting an ODBCException on the Fill (using an ODBC Driver,
ASCII, Tab deliniated, etc.)
The message is

Message "ERROR [42S02] [Microsoft][ODBC Text Driver] The Microsoft Jet
database engine could not find the object 'RTDXWRK.TXT'. Make sure the
object exists and that you spell its name and the path name correctly."
String


Yet it finds it in a few lines of code above. I have a directory window
open, works fine. I have my connection string set in the web.config for the
ODBC Ascii driver, thats fine. worked fine in the development environemtn,
but now.. not dice.

Are you sure the source directory is right in the Connection String? The
other thing is that sometimes in the ODBC Text Driver you are forced to
specify what file extentions it should recognize (ie. TXT, ASC, etc...), do
you have that option (Click options, then is should show an extention list)?

~
Jeremy
 
What OS are you running in VMW?



CJ Taylor said:
Hey Jeremy,

Yeah I got all that set right..

Like I said, when it was local, worked fine... now its not, doesn't work
fine...

=)


Jeremy Cowles said:
So, in the first development environment, it worked fine, Windows XP pro,
fine. Now I'm in my test environment, (VMWare 4.0 on my machien, VS.NET
2003) i keep getting an ODBCException on the Fill (using an ODBC Driver,
ASCII, Tab deliniated, etc.)
The message is

Message "ERROR [42S02] [Microsoft][ODBC Text Driver] The Microsoft Jet
database engine could not find the object 'RTDXWRK.TXT'. Make sure the
object exists and that you spell its name and the path name correctly."
String


Yet it finds it in a few lines of code above. I have a directory window
open, works fine. I have my connection string set in the web.config
for
the
ODBC Ascii driver, thats fine. worked fine in the development environemtn,
but now.. not dice.

Are you sure the source directory is right in the Connection String? The
other thing is that sometimes in the ODBC Text Driver you are forced to
specify what file extentions it should recognize (ie. TXT, ASC, etc...), do
you have that option (Click options, then is should show an extention list)?

~
Jeremy
 
Windows XP Pro...


Jeremy Cowles said:
What OS are you running in VMW?



CJ Taylor said:
Hey Jeremy,

Yeah I got all that set right..

Like I said, when it was local, worked fine... now its not, doesn't work
fine...

=)


Jeremy Cowles said:
So, in the first development environment, it worked fine, Windows XP pro,
fine. Now I'm in my test environment, (VMWare 4.0 on my machien, VS.NET
2003) i keep getting an ODBCException on the Fill (using an ODBC Driver,
ASCII, Tab deliniated, etc.)
The message is

Message "ERROR [42S02] [Microsoft][ODBC Text Driver] The Microsoft Jet
database engine could not find the object 'RTDXWRK.TXT'. Make sure the
object exists and that you spell its name and the path name correctly."
String


Yet it finds it in a few lines of code above. I have a directory window
open, works fine. I have my connection string set in the web.config for
the
ODBC Ascii driver, thats fine. worked fine in the development
environemtn,
but now.. not dice.

Are you sure the source directory is right in the Connection String? The
other thing is that sometimes in the ODBC Text Driver you are forced to
specify what file extentions it should recognize (ie. TXT, ASC,
etc...),
do
you have that option (Click options, then is should show an extention list)?

~
Jeremy
 
When I do the SQL Query, from the SQL Designer window, and choose "run" I
get data from my file. No problems right?

<Long-shot>
Could it be that the Query designer is locking the file? I guess you prolly
don't have that running in the VM though, do you? Could anything else be
locking the file?

~
Jeremy
 
Yeah, but its read only... I thought about it being the lcoking file from
the legacy system, but it doesn't lock that way, it uses a proprietary
function to lock the file (it creates antoher text file with a specific name
to check... but i am using the file system watcher class to tell me when the
file is written and closed...

like I said, works locally...

So, the drive is mapped, do you think that could be a problem? I'm trying
to implement it as a datareader right now..

-CJ
 
CJ
I know to less about ODBC and ASCI file to help you, but I have once
searched very long and after just a restart of the system it did work.
Maybe silly to say, but those things happens with me.
Cor
 
So, the drive is mapped, do you think that could be a problem? I'm trying
to implement it as a datareader right now..

Can you open the file with a TextStream? Maybe its a security issue...


~
Jeremy
 
Alright,

Well here is the results of a few tests...

I did it on both my local machine and virtual machine... the problem is
definatly the shared drive from the fill command.

I also did it with a ODBCDataReader and achieved the same results. So...
now the question is, how to solve this problem.

My one thought is to basically copy the file to a local directory
(ExecutionPath?), and then execute the dataadapter.fill method. I think
that will cover it, I was just hoping that the driver didn't suck so bad.

I don't know.. anyoen else have some ideas/

-CJ
 
Can you open the file with a text stream, or does this only happen when
using the Data objects?
 
OK...

Solution is to use DSNless connections. For some reason when Microsoft
creates a Server connection in the server manager to the form (component in
my case) it adds a buncha uneeded BS.

So I took it out, works great.

Peace,
CJ
 
Back
Top