error says table not found error, but it does exist.

J

James

how come i randomly get an error message saying table not found (exact error
message is pasted at bottom of this post). I get this error when trying to
perform a select statment with ADO in visual basic 6 on windows xp to a
remote access 97 .mdb via oledb.

Error #: -2147217865 Description: The Microsoft Jet database engine cannot
find the input table or query 'MyTableName'. Make sure it exists and that
its name is spelled correctly.
 
M

Michel Walsh

Hi,

What is your vb6 statement? Have you just created the table through code...
so maybe it is a timing problem. Are you using a transaction?

Hoping it may help,
Vanderghast, Access MVP
 
J

James

i just run a simple select statement using an ado command, recordset and
connection objects. i created the table manualy in access. no trasactions.



Michel Walsh said:
Hi,

What is your vb6 statement? Have you just created the table through
code... so maybe it is a timing problem. Are you using a transaction?

Hoping it may help,
Vanderghast, Access MVP
 
G

George Nicholson

Any chance the table is already open? (or still open from a previous
operation that didn't close it properly?)

The message might not literally mean "Can't find it". It might just mean "I
am unable to open a table with that name right now. Are you sure you gave me
a valid name?"

HTH,
--
George Nicholson

Remove 'Junk' from return address.


James said:
i just run a simple select statement using an ado command, recordset and
connection objects. i created the table manualy in access. no trasactions.
 
M

Michel Walsh

Hi,


Note that the WHOLE table can be locked if in some transaction, or if in
design mode from another application, or similar cases. (Locks can be at a
record level, at a page level, or at a table level).


Vanderghast, Access MVP
 
J

James

nope, nothing else is in those tables. and it closes the recordset before it
uses it uses the table again. however, it keeps the same connection...
 
D

Darrell Childress

Also, make sure you're not using security and the user is not restricted
from accessing that table.
Darrell
i just run a simple select statement using an ado command, recordset and
connection objects. i created the table manualy in access. no trasactions.
 
J

James

nope, no access security enabled.


Darrell Childress said:
Also, make sure you're not using security and the user is not restricted
from accessing that table.
Darrell
 
G

George Nicholson

and it closes the recordset before it uses it uses the table again.

does that include "Set rst = Nothing" ?
(sort of grasping at straws here)
 
J

James

yep it does. i know its so weird. the only thing i can think of is maybe a
corrupt database. i have used the repair/compact options in access and the
problem comes back again. i have imported the tables to a new db hoping to
recreate them and clean up any corrupt. but i again, the error comes back.


George Nicholson said:
and it closes the recordset before it uses it uses the table again.

does that include "Set rst = Nothing" ?
(sort of grasping at straws here)
 

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