![]() The Data Definition Language statements are generally executed with the ExecSQL method. The SQL statement can be executed in one of two ways, depending on the type of the statement. You can set the SQL property's value with the Object Inspector at design time or through code at runtime.Īt design-time, invoke the property editor for the SQL property by clicking the ellipsis button in the Object Inspector. Type the following SQL statement: "SELECT * FROM Authors". TADOQuery has a property (TStrings) called SQL which is used to store the SQL statement. ![]() The TADOQuery component doesn't have a TableNameproperty as the TADOTable does. The data-access components: DataSource, ADOConnection along with ADOQuery (instead of the ADOTable) and one data-aware component like DBGrid is all we need.Īs already explained, by using the Object Inspector set the link between those components as follows: To make a Delphi form capable of retrieving the data from an Access database with the ADOQuery component simply drop all the related data-access and data-aware components on it and make a link as described in the previous chapters of this course. In other words you should be familiar with the SQL writing differences between, for example, MS Access and MS SQL.Īs when working with the ADOTable component, the data in a database is accessed using a data store connection established by the ADOQuery component using its ConnectionString property or through a separate ADOConnection component specified in the Connectionproperty. ![]() ![]() The SQL used in a ADOQuery component must be acceptable to the ADO driver in use. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |