
This component returns a dataset from a query on a database.
When this property is set to True the component will show any data retrieved. When it is set to False the component is turned off.
This contains the text of the command that the component uses to retrieve the record set. Text commands can only include the SQL SELECT statement such as 'SELECT * FROM DRIVERS'. The DataSet component cannot issue DML commands like INSERT, DELETE or UPDATE.
This specifies the type of command contained in the CommandText property. Options include Text (for SQL), Stored Procedure, Table and File. THe most common types are Text and Table.
Set the ADO connection string in the same way as for any other ADO component. An ADOConnection component should be available for the current project, possibly in another form, in which case the unit that includes the ADOConnection should be included in the current unit.
For further details see the examples in the notes on databases.
This can be used in place of the Connection, if there is no master Connection object for the project or if, for some reason, a separate connection is required for the ADODataSet component.
The cursor or data source can be on the server or on the client.
The cursor type can be ForwardOnly, Static, Keyset or Dynamic. Cursor type determines the direction of scrolling through records (one-way or bi-directional) and whether the record set is updated during processing.
Double click on the component icon to open a field list box and right click inside this box. Choose an option to add fields and then drag the fields onto the form in the order required.
The CommandText property provides the facility to add SQL commands and there is a miniature SQL editor available by clicking on the diaresis. A quick way to add SQL code is to copy and paste it from a database application such as Access, which generates it from the QBE process (though it is not standard SQL).
The Active property should be set to True to view the data.