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

  • Thread starter Thread starter James
  • Start date Start date
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.
 
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
 
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
 
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.
 
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
 
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...
 
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.
 
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
 
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)
 
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)
 
Back
Top