under threads, how can create TSQLServerUniProvider?

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
TinTin
Posts: 46
Joined: Sat 30 May 2009 14:09

under threads, how can create TSQLServerUniProvider?

Post by TinTin » Sat 30 May 2009 14:26

dear devart :
I have some question.

environment:
D2007
MSSQL200
UniDAC 2.0
RO sdk 5.0.37

my question:
1.
I use TUniConnection under main form and threads mode.
so I use only create one TSQLServerUniProvider in the main form,or every thread must create one TSQLServerUniProvider?

2.
CoInitialize and CoUninitialize must typed in the thread mode and main form,or it only typed in the main form?


thanks!

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 01 Jun 2009 12:18

1. You don't need to create TSQLServerUniProvider. Only add the SQLServerUniProvider unit to the uses clause of the unit where TUniConnection is created.

2. You should execute the CoInitialize function in the thread, where connection to SQL Server is established.

Post Reply