Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to check if a table exists

Status
Not open for further replies.

fabry

Programmer
Jun 14, 2003
5
0
0
AR
How can I control if a table exists on my db and if not create one on the fly? My db is MS Access, I use SQL and ASP to connect to it.
Thanks to all.
Fabrizio
 
Not really an Access developer, but I would try the following.

When you process the OpenRecordset method against a table in Access Basic, it should return a discernable error, which may be interpretted as 'Table not found'.

A simple 'select count(*) from table1' should suffice to determine the tables' existance.

Ciao
AA 8~)
 
Thanks to all! The first trick is OK; but I try also to ask in Access forum, so I can know if there are other solutions!
Thanks again!
Fabrizio
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top