Results 1 to 3 of 3

Thread: create tables

  1. #1
    Join Date
    Sep 2001
    Location
    Vienna
    Posts
    400

    Unanswered: create tables

    I want to create tables with the Database object

    The only problem ist
    It does not exist in Access

    Does anyone knwo how I can create Tables with Access (office XP)
    http://www.postgresql.org
    --Postgresql is the only kind of thing--

  2. #2
    Join Date
    Oct 2002
    Location
    NSW Australia
    Posts
    61

    Re: create tables

    Originally posted by eperich
    I want to create tables with the Database object

    The only problem ist
    It does not exist in Access

    Does anyone knwo how I can create Tables with Access (office XP)
    from access help:
    This example creates a new table called MyTable with two Text fields, a Date/Time field, and a unique index made up of all three fields.

    Sub CreateTableX2()

    Dim dbs As Database

    ' Modify this line to include the path to Northwind
    ' on your computer.
    Set dbs = OpenDatabase("Northwind.mdb")

    ' Create a table with three fields and a unique
    ' index made up of all three fields.
    dbs.Execute "CREATE TABLE MyTable " _
    & "(FirstName TEXT, LastName TEXT, " _
    & "DateOfBirth DATETIME, " _
    & "CONSTRAINT MyTableConstraint UNIQUE " _
    & "(FirstName, LastName, DateOfBirth));"

    dbs.Close

    End Sub

  3. #3
    Join Date
    Sep 2001
    Location
    Vienna
    Posts
    400

    thanks

    I have the same example

    BUT IT DOES NOT WORK.

    Strange.
    But thanks. Now I know thats an access error.
    http://www.postgresql.org
    --Postgresql is the only kind of thing--

Posting Permissions

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