creating new connection

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
 

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