F
Frank Gordon
Hi,
I use an adp with acc2002 / sql2k. In a table I have a uniqueidentifier as
primary key and several foreign keys which are also of type
uniqueidentifier. The pk is generated via NEWID() as default. Strange thing
is that whenever you insert a new recordset the foreign keys are also
defaulted with new uniqueidentifier values. As a test, I deleted the NEWID()
default of the primary key but a new value is still generated for all
uniqueidentifier columns in the table. Just to be sure I created a completly
new table with two uniqueidentifiers, one the pk with no NEWID(), and a
dummy nvchar data field. Whenever I insert data into the dummy field new
uniqueidentifiers are automatically created. There are no defaults,
triggers, relationships etc. When I use the Enterprise manager to insert
data, the behavior of the tables is normal, e.g. only uniqueidentifiers with
a default NEWID() are created the others are left blank as should be. This
is really annoying as it compromises data integrity with related tables. Any
ideas / solutions ??
Thanks
Frank
I use an adp with acc2002 / sql2k. In a table I have a uniqueidentifier as
primary key and several foreign keys which are also of type
uniqueidentifier. The pk is generated via NEWID() as default. Strange thing
is that whenever you insert a new recordset the foreign keys are also
defaulted with new uniqueidentifier values. As a test, I deleted the NEWID()
default of the primary key but a new value is still generated for all
uniqueidentifier columns in the table. Just to be sure I created a completly
new table with two uniqueidentifiers, one the pk with no NEWID(), and a
dummy nvchar data field. Whenever I insert data into the dummy field new
uniqueidentifiers are automatically created. There are no defaults,
triggers, relationships etc. When I use the Enterprise manager to insert
data, the behavior of the tables is normal, e.g. only uniqueidentifiers with
a default NEWID() are created the others are left blank as should be. This
is really annoying as it compromises data integrity with related tables. Any
ideas / solutions ??
Thanks
Frank