D
David Mueller
I'm trying to drop a relationship using SQL DDL but I get a "CHECK constraint
.... does not exist" message.
ALTER TABLE mytable DROP CONSTRAINT [relation-name-goes-here]
I can't seem to indentify the name of the constraint(relationship) I want to
drop. I checked the MSysRelationships table and I see a registry-key-like
name in there (szRelationship field). That same value is spit out when I
loop through using ... debug.print currentdb.relationship(x).name .... so I'm
thinking that would be the right name to use in the SQL statement.
I tried w/wo braces, single/double quotes, ... I even put in a dirty word
but I can't seem to drop that constraint.
The bigger picture ...
What I really need to do is modify the length of the field, but the field is
part of the relationship. So, I'm trying to drop the relationship, alter the
column, and then I'll put the relationship back. I need to use SQL DDL
because this update will be applied to many MDB files via a VBA routine.
1. I type SQL DDL into a version control table.
2. VBA code executes the SQL DDL against databases that haven't recieved
the update.
Thanks,
David
.... does not exist" message.
ALTER TABLE mytable DROP CONSTRAINT [relation-name-goes-here]
I can't seem to indentify the name of the constraint(relationship) I want to
drop. I checked the MSysRelationships table and I see a registry-key-like
name in there (szRelationship field). That same value is spit out when I
loop through using ... debug.print currentdb.relationship(x).name .... so I'm
thinking that would be the right name to use in the SQL statement.
I tried w/wo braces, single/double quotes, ... I even put in a dirty word
but I can't seem to drop that constraint.
The bigger picture ...
What I really need to do is modify the length of the field, but the field is
part of the relationship. So, I'm trying to drop the relationship, alter the
column, and then I'll put the relationship back. I need to use SQL DDL
because this update will be applied to many MDB files via a VBA routine.
1. I type SQL DDL into a version control table.
2. VBA code executes the SQL DDL against databases that haven't recieved
the update.
Thanks,
David