property SQLite_execQuery.
Executes SQL query with SELECT keyword or executes
synchronous DML commands: CREATE,
DROP, INSERT, UPDATE, DELETE
|
hSQlite3DB
[in] . Handle
of SQLite database
SQLQuery
[in] . Query string
pVal
[out, retval] The returned value is:
. a handle of recordset (if rows are found)
. 0 if no result or in the case of executing CREATE, DROP, INSERT,
UPDATE, DELETE
. error code if failure occurred.
S_OK
The operation was successfull.
E_POINTER
A NULL pointer was supplied as an argument.
E_UNEXPECTED
An unexpected error occoured.
Example in VBScript:
Set
ScriptEZ = CreateObject(“ScriptEZ.API”) ‘ Instantiating object
hSQLite = ScriptEZ.CreateSQLiteDBObject(“c:\sqliteDepot\Annuaire.ldb”)
If
hSQLite > 0 Then
hRecordset =
ScriptEZ.SQLite_execQuery(hSQLite,”SELECT
* FROM SOCIETE LIMIT 10;”)
If hRecordset > 0 Then
Do
ScriptEZ.Echo ScriptEZ.SQLite_fieldValueById(hRecordset,0) ‘
NOM
ScriptEZ.Echo ScriptEZ.SQLite_fieldValueByName(hRecordset,”ACTIVITE”)‘ ACTIVITE
Loop
Until ScriptEZ.SQLite_nextRow(hRecordset)
= 0 ‘ End of rows
ScriptEZ.SQLite_freeRecordSet hRecordset
End If
ScriptEZ.DestroySQLiteDBObject hSQLite
End
If