views:

26

answers:

0

I'm working on an application that creates a single ADO connection and keeps it open for the lifetime of the application. I have connection pooling turned off.

(Please ignore the fact that this might not be best practice for the purposes of this question).

If I spawn a new thread and use the exact same ADO connection, it uses a new SPID behind the scenes.

Is there anyway to ensure an ADO connection always uses the same SPID, across all threads?

(For reference the application is VC++ using ADO via COM to SQL Server).