Results 1 to 3 of 3

Thread: Is table exist

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 1999
    Location
    San Diego, Ca , USA
    Posts
    44

    Post

    Hello everyone,

    How can I chech if the table is exist in a database? Just in case if someone delete my table inside a database.

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    Let's say you are looking for a table named MyTable.

    Then you would use something like:


    Dim db As Database
    Dim tb As TableDef

    Set db = Workspaces(0).OpenDatabase("C:\MyDB.mdb")

    For each tb In db.TableDefs
    If tb.Name = "MyTable" Then
    'You found your table
    Exit For
    End If
    Next



    Best regards,

    ------------------

    Serge

    [email protected]
    [email protected]
    If you have any questions about AOL programming, e-mail me


  3. #3
    New Member
    Join Date
    May 1999
    Location
    memphis, tn,usa
    Posts
    1

    Post

    In oracle you could try selecting for the table name against the TAB table.
    Chip

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