delphi 7 ado
The TADOQuery component provides Delphi developers the ability to fetch data from one or multiple tables from an ADO database using SQL.
TADOQuery组件使Delphi开发人员能够使用SQL从ADO数据库的一个或多个表中获取数据。
These SQL statements can either be DDL (Data Definition Language) statements such as CREATE TABLE, ALTER INDEX, and so forth, or they can be DML (Data Manipulation Language) statements, such as SELECT, UPDATE, and DELETE. The most common statement, however, is the SELECT statement, which produces a view similar to that available using a Table component.
这些SQL语句可以是DDL(数据定义语言)语句,例如CREATE TABLE,ALTER INDEX等,也可以是DML(数据操作语言)语句,例如SELECT,UPDATE和DELETE。 但是,最常见的语句是SELECT语句,它产生的视图类似于使用Table组件可获得的视图。
Note: even though executing commands using the ADOQuery component is possible, the ADOCommandcomponent is more appropriate for this purpose. It is most often used to execute DDL commands or to execute a stored procedure (even though you should use theTADOStoredProc for such tasks) that does not return a result set.
注意:尽管可以使用ADOQuery组件执行命令,但ADOCommand组件更适合于此目的。 它最常用于执行DDL命令或执行不返回结果集的存储过程(即使您应将TADOStoredProc用于此类任务)。
The SQL used in a ADOQuery component must be acceptable to the ADO driver in use. In other words you should be familiar with the SQL writing differences between, for example, MS Access and MS SQL.
ADOQuery组件中使用SQL必须对所使用的ADO驱动程序可接受。 换句话说,您应该熟悉MS Access和MS SQL之间SQL编写差异。
As when working with the ADOTable component, the data in a database is accessed using a data store connection established by the ADOQuery component using itsConnectionString property or through a separate ADOConnection component specified in the Connectionproperty.
如同ADOTable组件工作时,在一个数据库中的数据是使用通过使用其ConnectionString属性的ADOQuery组分或通过在连接属性中指定的单独的ADOConnection分量建立的数据存储连接访问。