Results 1 to 5 of 5

Thread: Database Question [SOLVED]

Threaded View

  1. #1

    Thread Starter
    Fanatic Member hothead's Avatar
    Join Date
    Mar 2002
    Location
    Missouri
    Posts
    692

    Database Question [SOLVED]

    While searching the forums, I found a code that allows one to create tables programmatically.

    VB Code:
    1. Set db = CreateDatabase("C:\NewDB.MDB", dbLangGeneral, dbVersion40)
    2.  
    3. 'add a table with some fields
    4. sql = "CREATE TABLE TestTable (ID COUNTER, SetName TEXT(50), SetVal TEXT(255), Description TEXT(255))"
    5. db.Execute sql

    This worked great, but I can't get it to work with a database that already exists. How do you get this code to work if the database already exists?
    Last edited by hothead; May 12th, 2004 at 07:49 PM.

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