adding a column to a linked table

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • A

    #1

    adding a column to a linked table

    Hi
    I use the following to add a column. This does not work on a linked table.
    Error: Cannot execute data definition statements on linked data sources.
    Any ideas ?
    Thanks
    Alfred

    Dim cmd As New ADODB.Command
    cmd.ActiveConne ction = CurrentProject. Connection
    cmd.CommandText = "ALTER TABLE QuoteDetails ADD COLUMN IdNo
    AUTOINCREMENT(1 ,1);"
    On Error Resume Next 'gives error if column already exists
    cmd.Execute


  • Terry Kreft

    #2
    Re: adding a column to a linked table

    You can't update a linked table you have to update it in the source
    database.


    --
    Terry Kreft



    "A" <alar@mail.co m> wrote in message news:dl1ut5$3sl $1@ctb-nnrp2.saix.net. ..[color=blue]
    > Hi
    > I use the following to add a column. This does not work on a linked table.
    > Error: Cannot execute data definition statements on linked data sources.
    > Any ideas ?
    > Thanks
    > Alfred
    >
    > Dim cmd As New ADODB.Command
    > cmd.ActiveConne ction = CurrentProject. Connection
    > cmd.CommandText = "ALTER TABLE QuoteDetails ADD COLUMN IdNo
    > AUTOINCREMENT(1 ,1);"
    > On Error Resume Next 'gives error if column already exists
    > cmd.Execute
    >
    >[/color]


    Comment

    Working...