Results 1 to 3 of 3

Thread: About d MSysObjects table

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Location
    Philippines
    Posts
    24

    Unhappy

    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.

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    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

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Location
    Philippines
    Posts
    24

    Unhappy



    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?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width