You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using MARS with UniDAC database access components. UniDAC has several SQL Server access methods and one is using OLE DB. OLE DB connection needs CoInitialize() in unit Winapi.ActiveX to be called before accessing SQL Server databases. In fact, this has to be called for each thread that will make a connection to an SQL Server database.
I tried to use initialization and finalization sections of Server.Resource.pas but this didn't help as each method may establish a new database connection.
Is it possible to avoid calling CoInitialize() and CoUninitialize() in each method beginning and end respectively? I rather would like to use these calls in events. Is that possible? If yes, I would like to learn these events and how to make it work, please.
Thanks & Regards,
Ertan
The text was updated successfully, but these errors were encountered:
Hello,
I am using MARS with UniDAC database access components. UniDAC has several SQL Server access methods and one is using OLE DB. OLE DB connection needs
CoInitialize()
in unitWinapi.ActiveX
to be called before accessing SQL Server databases. In fact, this has to be called for each thread that will make a connection to an SQL Server database.I tried to use
initialization
andfinalization
sections ofServer.Resource.pas
but this didn't help as each method may establish a new database connection.Is it possible to avoid calling
CoInitialize()
andCoUninitialize()
in each method beginning and end respectively? I rather would like to use these calls in events. Is that possible? If yes, I would like to learn these events and how to make it work, please.Thanks & Regards,
Ertan
The text was updated successfully, but these errors were encountered: