Database objects
Database connection object
[Desktop Automation]
Database connection and query handler.
Properties
| Property | Read/write | Type | Description |
|---|---|---|---|
| connected | read-only | Boolean | Returns true when the DB connection is established |
| lasterror | Read-only | String | The last DB error |
Methods
| Name | Syntax | Description |
|---|---|---|
| checkiftableexists | Result = dbconnection:checkiftableexists(tablename:string); | Returns true when table with tablename exists |
| createttable | Result = dbconnection:createttable(tablename:string); | Creates a new table |
| disconnect | dbconnection:disconnect(); | Disconnects from the DB |
| getinsertid | insertid = dbconnection:getinsertid(); | Returns the last insert id |
| getresult | Queryresult = dbconnection:getresult(); | Returns the QueryResult Object |
| getuniquestring | uniquestring = dbconnection:getuniquestring(); | Gets unique string |
| sendquery | Result = dbconnection:sendquery(query:string); | Returns true when successful; the query result can be evaluated with "getresult". |
Query result object
[Desktop Automation]
The result object of a database query.
Properties
None.
Methods
| Name | Syntax | Description |
|---|---|---|
| getintegerfield | IntResult = queryresult:getintegerfield(fieldnumber:number); | Returns the Integer value of the field in fieldnumber |
| getfield | StringResult = queryresult:getfield(fieldnumber:number); | Returns the String value of the field in fieldnumber |
| getfieldcount | Result = queryresult:getfieldcount(); | Returns number of fields in row |
| getfloatfield | FloatResult = queryresult:getintegerfield(fieldnumber:number); | Returns the Float value of the field in fieldnumber |
| nextrow | queryresult:nextrow(); | Put the result pointer to the next row |
