SQL Server connection sharing
-
Hi everyone :) I'm not sure if this is possible, but I was wondering if there was a way for two threads to concurrently (and reasonably independently) share an SQL Server connection, such as the OLE DB templates CDataSource object? Presently, my attempts have been serialised internally by SQL Server, so that the net effect is that one of the requests must complete before the other can begin... thanks to anyone who can offer some pointers! nb
-
Hi everyone :) I'm not sure if this is possible, but I was wondering if there was a way for two threads to concurrently (and reasonably independently) share an SQL Server connection, such as the OLE DB templates CDataSource object? Presently, my attempts have been serialised internally by SQL Server, so that the net effect is that one of the requests must complete before the other can begin... thanks to anyone who can offer some pointers! nb
One possible way of implementing this is to use ADO and ADO Events. Basically you execute a SQl statement and once the statement has been executed, you will recieve an EVENT that the execution has completed. This will allow you to run your second sql statement. knowing the first one has finished. see the following for example http://msdn.microsoft.com/library/default.asp?url=/library/en- us/ado270/htm/mdevteventmodelxvc.asp
-
One possible way of implementing this is to use ADO and ADO Events. Basically you execute a SQl statement and once the statement has been executed, you will recieve an EVENT that the execution has completed. This will allow you to run your second sql statement. knowing the first one has finished. see the following for example http://msdn.microsoft.com/library/default.asp?url=/library/en- us/ado270/htm/mdevteventmodelxvc.asp