Strange uniqueidentifier behavior in adp

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
 
F

Frank Gordon

Hello again,

to look further into the issue I now created an unbound form in access and
wrote the values into the table via ado. In that case only NEWID() defaulted
uniqueidentifiers are generated as should be. So the described problem
occurs only if bound forms are used or data is inserted into the tables
directly when in dataview.
As another test I created a new access-only database (.mdb) with a table
with replication-ids. The strange behavior does not occur there, that is
those ids are only generated if set to AutoValue. I am at a loss here...

Regards,

Frank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top