how to check if table exists in Access with ADO?

B

Billy

Hi,

I need to see if a table exists in Access using ADO. I
tried

"Select Name from MSysObjects Where Name = 'myTable'"

But I got an error message that I don't have permission to
read MSysObjects. But I can query MSysObjects from within
Access. Does anyone know of another way to check if a
table exists in Access without having to use On Error
Resume Next?

Thanks,

Billy
 
A

Allen Browne

ADO is only half the story. For information on the database schema, you need
the ADOX library so you can examine the Tables collection of the Catalog.

Unfortunately, ADOX is really half-baked and unreliable.

It should be possible to read MSysObjects though (unless you are blocked by
MDW security).
 

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