ALTER Table in ODBC

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

    ALTER Table in ODBC

    Hi,

    Does anyone know if it is possible to alter an access table through ODBC. I
    am using the following SQL statement to add a foreign key to a table.
    Access returns an error like "Syntax error in CONSTRAINT clause". Some how
    access does not like "ON DELETE CASCADE"

    any help is much appreciated

    ALTER TABLE TData

    ADD CONSTRAINT FK_nDataID

    FOREIGN KEY (nDataID) REFERENCES

    TRefStubData(nD ataID)

    ON DELETE CASCADE


  • John Winterbottom

    #2
    Re: ALTER Table in ODBC

    "Jens" <jens.schmidt@x xxinnerrange.co m.xxx> wrote in message
    news:2jskagF13n jq2U1@uni-berlin.de...[color=blue]
    > Hi,
    >
    > Does anyone know if it is possible to alter an access table through ODBC.[/color]
    I[color=blue]
    > am using the following SQL statement to add a foreign key to a table.
    > Access returns an error like "Syntax error in CONSTRAINT clause". Some how
    > access does not like "ON DELETE CASCADE"
    >
    > any help is much appreciated
    >
    > ALTER TABLE TData
    >
    > ADD CONSTRAINT FK_nDataID
    >
    > FOREIGN KEY (nDataID) REFERENCES
    >
    > TRefStubData(nD ataID)
    >
    > ON DELETE CASCADE
    >[/color]


    yes, it is possible, AFAIK that syntax should work fine in Access


    Comment

    Working...