How to generate a GUID in SQL Server via Access

N

Norman

Thanks for looking at this and let me explain

I have inherited a home brew database that contains password and
machine information. The database is running on a MS SQL Server 2000
instance and the users have an Access front end that can be used to
view, update and enter new data. I can get this to work to veiw and
update existing data but cannot get it to generate the GUID field.

The SQL Server fields in the table tblSystems are:
ID (uniqueidentifier)
GroupAllowed (varchar)
SystemName (varchar)
etc.

I've linked the Access table to the MSSQL table and like I said, I can
update and view records but not create a new one. In Access, I can
enter the data needed but the ID field (the GUID) doesn't autopopulate
and I don't see a comparable data type in Access.

Any thoughts about what I can do to make everyone happy?

Thanks!
Norman
 
A

a a r o n . k e m p f

I'd try putting the field default to 'NewID' or 'NewID()'

It's a little bit picky in some places.

-Aaron
 
N

Norman

I'd try putting the field default to 'NewID' or 'NewID()'

It's a little bit picky in some places.

-Aaron








- Show quoted text -

Aaron! Thanks! This was what was missing. Adding this NewID() as the
default in the SQL 2000 server field worked! Sorry for taking a couple
of days to back to this but other things got in the way.

Again, great advice and thanks!

Norman
 

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