|
Posted by ByB on 06/17/07 03:38
Hello,
I am working on an Access VBA application, working in client/server
mode, with a shared SQL Server base.
I have to INSERT some data in the base, and the know what is the ID
that SQL Server associated with my data in the table. So I need to do
the following
INSERT data INTO TABLE
SELECT MAX ID FROM TABLE (to get the ID)
but since I am working in client/server, if some DATA has been inserted
by another client after my INSERT, then MAX ID is not the convenient
ID of my data ...
Is there a way for me to get the ID when I do the INSERT, or to
lock/unlock the table before the INSERT and after the SELECT ?
Thank you for any hint about that.
--
L'ordinateur peut faire plus de calculs que le cerveau de l'homme car
il n'a que ça à faire
Navigation:
[Reply to this message]
|