By design, a Delphi application runs in one thread. To speed up some parts of the application you might want to decide to add several simultaneous paths of execution in your Delphi application.
按照设计,Delphi应用程序在一个线程中运行。 为了加快应用程序的某些部分的速度,您可能需要决定在Delphi应用程序中添加多个同时的执行路径。
数据库应用程序中的多线程 ( Multithreading in Database Applications )
In most scenarios, database applications you create with Delphi are single threaded—a query you run against the database needs to finish (processing of the query results) before you can fetch another set of data.
在大多数情况下,使用Delphi创建的数据库应用程序是单线程的-对数据库运行的查询需要先完成(查询结果的处理),然后才能获取另一组数据。
To speed up data processing, for example, fetching data from the database to create reports, you can add an additional thread to fetch and operate on the result (recordset).
为了加快数据处理速度,例如,从数据库中获取数据以创建报告,可以添加其他线程来获取结果并对其进行操作(记录集)。
Continue reading to learn about the 3 traps in multithreaded ADO database queries:
继续阅读以了解多线程ADO数据库查询中的3个陷阱:
Solve: "CoInitialize was not called".
解决:“ 未调用CoInitialize ”。
Solve: "Canvas does not allow drawing".
解决:“ 画布不允许绘制 ”。
- Main TADoConnection cannot be used! 无法使用主TADoConnection!