Execute: Integer;
The Execute method runs query and returns the number of processed records.
This method can be used to execute queries that insert or delete data. The method results in the number of inserted or deleted records. The method is not used to work with other object types, and method execution will not result in any actions.
Executing the example requires that the repository contains a query with the INS_QUERY identifier. Query text is created to insert some data to repository tables.
Add links to the Db and Metabase system assemblies.
Sub UserProc;
Var
Mb: IMetabase;
DatasetInst: IDatasetInstance;
Begin
Mb := MetabaseClass.Active;
DatasetInst := Mb.ItemById("INS_QUERY").Open(Null) As IDatasetInstance;
Debug.WriteLine(DatasetInst.Execute);
End Sub UserProc;
After executing the example a query is started for execution, which inserts data to repository tables. The number of inserted rows is displayed in the development environment console.
See also: