D
Dhananjay
Hi all!
I am using vb6 & access 2003.
I am adding one constraint on existing table's column like -
"ALTER TABLE XYZ ADD CONSTRAINT FK_XYZ_ABC FOREIGN KEY (XId) REFERENCES
ABC(XID) ON UPDATE CASCADE ON DELETE CASCADE"
But I am getting the error "SYNTAX ERROR" at ON UPDATE.
I m using the connection object . My code snippet is below-
'********************************************
dim con as adodb.connection
con.ConnectionString = "DSN=" & Trim(DSN) & ";uid=" & Trim(User) &
";pwd=" & Trim(pwd)
con.open
sAccess="ALTER TABLE XYZ ADD CONSTRAINT FK_XYZ_ABC FOREIGN KEY (XId)
REFERENCES ABC(XID) ON UPDATE CASCADE ON DELETE CASCADE"
con.execute sAccess
'********************************************
Any help would be greatly appriciable!!
Thanks in advance.
Dhananjay
I am using vb6 & access 2003.
I am adding one constraint on existing table's column like -
"ALTER TABLE XYZ ADD CONSTRAINT FK_XYZ_ABC FOREIGN KEY (XId) REFERENCES
ABC(XID) ON UPDATE CASCADE ON DELETE CASCADE"
But I am getting the error "SYNTAX ERROR" at ON UPDATE.
I m using the connection object . My code snippet is below-
'********************************************
dim con as adodb.connection
con.ConnectionString = "DSN=" & Trim(DSN) & ";uid=" & Trim(User) &
";pwd=" & Trim(pwd)
con.open
sAccess="ALTER TABLE XYZ ADD CONSTRAINT FK_XYZ_ABC FOREIGN KEY (XId)
REFERENCES ABC(XID) ON UPDATE CASCADE ON DELETE CASCADE"
con.execute sAccess
'********************************************
Any help would be greatly appriciable!!
Thanks in advance.
Dhananjay