Is Delphi's TADOConnection thread-safe?

后端 未结 2 714
Happy的楠姐
Happy的楠姐 2020-12-06 11:36

I\'m writing a Delphi 7 application which needs to access the same SQL Server database from many different threads simultaneously.

Can I use a single shared TADOConn

2条回答
  •  执笔经年
    2020-12-06 12:18

    No, it is not. ADO is a COM-based technology. It uses apartment-threaded objects, thus you cannot use ADO connections across thread boundaries. Each thread need its own connection.

提交回复
热议问题