ODBC ASCII Driver - VS.NET(vb) 2003

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
 
J

Jeremy Cowles

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
 
C

CJ Taylor

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
 
J

Jeremy Cowles

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
 
C

CJ Taylor

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
 
J

Jeremy Cowles

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
 
C

CJ Taylor

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
 
C

Cor

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
 
J

Jeremy Cowles

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
 
C

CJ Taylor

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
 
J

Jeremy Cowles

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

CJ Taylor

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top