Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Table exists?

    Hi,
    can anyone tell me, how to find out if a table in an MS Access DB exists?
    Also, I'd like to find out, if certain columns exits if a table exists. Will
    CREATE TABLE overwirte an existing table?

    Thanks, Liglin



    liglin1 Guest

  2. Similar Questions and Discussions

    1. Check if table exists
      ON.KG wrote: One thing to consider: you are making a trip to the database to determine if a table exists. If it exists, you are then making...
    2. Testing if a mysql table exists
      Is there a simple way to test if a mysql table exists? JUST One line !
    3. Is there anything like an 'exists table' method I can use?
      I need to run a querry from an asp page only if a certain table exists in the data base. Is there any kind of method that can look at the database...
    4. Table Exists
      I am wanting to check the existance of a table in my informix db before I query it, since if I query a table that does not exist, it'll blow up on...
    5. Another user has modified the contents of this table or view; the database row you are modifying no longer exists in the database;
      Hi, I am testing a trigger that and I am getting this error message saying "Another user has modified the contents of this table or view; the...
  3. #2

    Default Re: Table exists?

    Hi,

    Create table does not overwrite an existing table. You will get an error.

    Not sure if the following will work in MS Access, but it works in MS SQL 2000

    if exists (select 1
    from sysobjects
    where id = object_id('table_name')
    and type = 'U')
    BEGIN
    drop table table_name
    END

    column names are similiar, you will have to look up the syntax yourself.



    Scott*e Guest

  4. #3

    Default Re: Table exists?

    Why would you need this with Access database. Just open it in design mode and
    see. It's not protected usually. If table exist you need rename it or delete in
    order to use the same name for newly created. When imported table with the same
    name it creates automatically new name with index. When exported it will
    overwrite existing table with or without promt depending on your db settings.

    CF_Oracle Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139