G
gabor123
Hi,
I would like to open a new connection from code in order to get a new value
for spid (@@spid)
Here is the code which is not good beacuse I get the same spid:
Dim mr_s As New Recordset
Dim mc As New Connection
Set mr_s = CurrentProject.Connection.Execute("select @@spid")
Debug.Print mr_s.Fields(0)
Set mc = CurrentProject.Connection
mc.Execute ("select @@spid")
Debug.Print mr_s.Fields(0)
Thank's for your help
Gabor
I would like to open a new connection from code in order to get a new value
for spid (@@spid)
Here is the code which is not good beacuse I get the same spid:
Dim mr_s As New Recordset
Dim mc As New Connection
Set mr_s = CurrentProject.Connection.Execute("select @@spid")
Debug.Print mr_s.Fields(0)
Set mc = CurrentProject.Connection
mc.Execute ("select @@spid")
Debug.Print mr_s.Fields(0)
Thank's for your help
Gabor