Elroy Taulton
asked on
Passing <uniqueidentifier> from MS Access 2007 to SQL Database Table
I am creating a Access Form (2007) that will be utilize to update and create new records that are stored in a backend SQL Server 2008 Table. One of my fields in this table is a UniqueID. From SQL, I can use newid() to create this unique value. How can do this in the actual Access Form OR what are my options for this?
ASKER
Thanks Jeff, but you are correct. This is a multi-user environment and this method may cause problems. Are there other options for doing this?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
yes.
I have a UniqueID field in my SQL table. It is type uniueidentifier and a primary key.
I have a UniqueID field in my SQL table. It is type uniueidentifier and a primary key.
So are you saying if you add a record in Access, the SQL autonumber is not created?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks for chiming in mbizup...
As you know SQL is not my strong point...
;-)
Jeff
As you know SQL is not my strong point...
;-)
Jeff
ASKER
Thanks for the help on this one.
One is to use a function that simply adds 1 to the highest number
Function NextNumber() as long
NextNumber=Dmax("YourIDFie
end function.
This may not be perfect for a multi-user environment...
So lets see what other experts post...
JeffCoachman