Generating a SQL Unique Identifier, round 2

G

Guest

The solution provided a way to generate a GUID. Unfortunately, I can't get
the GUID into my rows when a new one is being created. The View that I am
working with is linked as a table via ODBC. I have a Before Insert trigger
(ASccess) on the maintenance form and have tried a myriad of approaches to
putting a GUID into the relevant row in that procedure, getting a variety of
error messages.

This leads me to question if Access actually understands what a GUID is?
The row in question was defined as a Number of type Replication ID when I
linked the table. I can't find any documentation references to a Replication
ID.

The value that gets passed to the SQL database is irrelevant as a legitimate
GUID is applied by the INSTEAD OF trigger on the server. As a test I tride
to assign a value of 10 to the GUID column and got an error message that the
value is too large. I have tried the GUIDFromString function which gives me
a 16 byte GUID, but then how do I get it into the cell?

So now I'm down to wondering what am I missing? Do I need to detach the form
from any table(s) and just fetch and update data when the user identifies and
changes existing data and apply a similar methodology to inserts and deletes?

Any insights would be appreciated
 
A

Alex Dybenko

If you have GUID as primary key - then right approach - is to let SQL server
save records, then get just inserted GUID
 

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