1

I want to use a query to check if there exists a table in my access database, if not then I can create that table. I'm using Ruby to call functions to execute SQL query, such as Insert, Select, Update, Create etc.

I looked up some solutions such as MSysObjects, but it doesn't work for the Access 2007.

So anyone who is familiar with Access database can help me with this problem?

Thank you.

4

2 回答 2

1

这个问题已经解决了,我被困在寻找SQL查询来解决这个问题,但是我忘记了当没有这样的表存在时我可以捕获异常然后执行一些操作。感谢@HansUp 的建议。

于 2013-09-23T17:58:51.107 回答
0
Exists = IsObject(CurrentDb.TableDefs(tablename))
于 2013-09-23T17:21:10.363 回答