QueryOpenDBX |
Top Previous Next |
Prototype
IntTableHandle:=QueryOpenDBX(strDataBaseName,strSQL,strUser,strPassword)
Description
It makes a SQL query on a database using a DBX database connection.
Parameters
StrDataBaseName: string corresponding to the dbExpress link defined in the proper .ini file.
StrSQL: string corresponding to the SQL text with the query to execute.
StrUser: user name for database log-in
StrPassword: password for database log-in
Returned value
IntTableHandle: integer value corresponding to the handle of the virtual table returned from query.
Notes
Database and table must exist.
The returned value can be used with the functions operating on tables (TableClose, TableRecordCount, TableFirst,…).
In strSQL be careful to apostrophe (') and inverted commas (").
Example
// It stores query handle OneTable:= QueryOpenDBX('testDBX','select * from statistics','','');
// Executes other operations
// Closes the virtual table of the query TableClose(OneTable);
|