-
I tried using this SQL statement in checking if a certain
tablename exist in an Access2000 database:
"SELECT name FROM MSysObjects WHERE name = '" & _
tablename & "'"
Unfortunately, it reports an error "Record(s) cannot be read; no permission on 'MSysObjects" even if I view hidden
and system objects.
How can I go around this error.
-
I don't know the answer to your question, but here is a different method to determine if a table exists. This is DAO.
Code:
For nCtr = 0 To gdbTargetDB.TableDefs.Count - 1
If UCase(gdbTargetDB.TableDefs(nCtr).Name) = UCase(sTableName) Then
bFound = True
Exit For
End If
Next
-
I just want to use that SQL statement, I don't want to loop through all the Tabledefs in the database...is there
any way of altering the database security in code?