Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2005
    Posts
    115

    Unanswered: CREATE TABLE access 2000 datatypes problem

    I am having problems with datatypes and access

    Code:
    CREATE TABLE __test (
    id_test AutoNumber ,
    name text (100) NULL ,
    Marque text (100) NULL ,
    dateIns DateTime NULL ,
    Etat Bit NULL ,
    Prix Double,
    Primary Key (id_test),
    )
    what is the right syntax for it ?

    i need an autoincrement as primary key, and a bit (0 to 255)

    thank you

  2. #2
    Join Date
    Mar 2006
    Posts
    163
    The following will create an Autonumber field that is the primary key.
    Code:
    CREATE TABLE __test (
    id_test Counter Primary Key ,
    name text (100) NULL ,
    Marque text (100) NULL ,
    dateIns DateTime NULL ,
    Etat Bit NULL ,
    Prix Double)

  3. #3
    Join Date
    Jun 2005
    Posts
    115
    it works !
    thank you

  4. #4
    Join Date
    Mar 2006
    Posts
    163
    quentin

    Glad to hear that.

    What about the bit part?

    I wasn't quite sure what you meant there so didn't really address that.

  5. #5
    Join Date
    Jun 2005
    Posts
    115
    with bit I get a booelan (trur/false)
    but i cant find a numeric 0-255 ! it is not smallint ... no idea for the moment
    thank you

  6. #6
    Join Date
    Mar 2006
    Posts
    163
    Is this it?
    Code:
    CREATE TABLE __test (
    id_test Counter Primary Key ,
    name text (100) NULL ,
    Marque text (100) NULL ,
    dateIns DateTime NULL ,
    Etat Byte  ,
    Prix Double)

Posting Permissions

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