Results 1 to 4 of 4

Thread: add field to access db table

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2009
    Posts
    157

    add field to access db table

    How can i add a field to a access db table. using ado and jet

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: add field to access db table

    You can execute an Alter Table statement. Following is the syntax supported by Jet/Access

    ALTER TABLE table {ADD {COLUMN field type[(size)] [NOT NULL] [CONSTRAINT index] |
    CONSTRAINT multifieldindex} |
    DROP {COLUMN field I CONSTRAINT indexname} }

    strSQL = "Alter Table Shippers Add Column Testing Text(10) Null Default 'Hello'"

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Feb 2009
    Posts
    157

    Re: add field to access db table

    Quote Originally Posted by brucevde View Post
    You can execute an Alter Table statement. Following is the syntax supported by Jet/Access

    ALTER TABLE table {ADD {COLUMN field type[(size)] [NOT NULL] [CONSTRAINT index] |
    CONSTRAINT multifieldindex} |
    DROP {COLUMN field I CONSTRAINT indexname} }

    strSQL = "Alter Table Shippers Add Column Testing Text(10) Null Default 'Hello'"
    Thanks
    new to databases, in what mode would i open the db ?

  4. #4
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: add field to access db table

    No special mode just open the connection and execute an SQL statement on a command object.
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

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