|
|
|
|
|
- Overview
- Programming
- 1. Opening the connection
- 2. Running queries
- 3. Retrieving the result
- 4. Closing the connection
SQLite Native Connector: Programming using SQL functions
Disponible solo con este tipo de conexión
The use of SQL functions to handle SQLite data does not require importing the data file structure into the analysis. However, the data must be handled by queries only. The content of SQLite files cannot be read directly. Remark: Don't forget to check the limitations concerning the use of the SQLite Native Connector. 1. Opening the connection SQLConnect opens a connection to an SQLite database via the Native Connector. The type of database used (SQLITE in this case) must be passed as parameter to SQLConnect. The database name corresponds to the name of the database file ConnectionNum = SQLConnect("SQLiteDatabase", "sa", "", "", "SQLITE")
2. Running queries The queries are run by SQLExec. SQLExec expects the text of the SQL query as parameter, as well as the name that will be given to this query. SQLExec("SELECT LASTNAME, FIRSTNAME, EXTENSION, PHOTO FROM CUSTOMER", "QRY1")
3. Retrieving the result Several methods can be used to retrieve the result: - SQLFirst: Gets the result and starts an iteration with SQLFirst/SQLCol.
- SQLTable: Retrieves the result of the query in a Table control populated programmatically in the WINDEV application or WEBDEV website. The result of the query can be retrieved by partial Fetch.
- SQLFetch: Used to read the different lines of the query result. The iteration over the query result is performed with SQLFetch/SQLGetCol.
SQLLock is used to lock the table records or the records selected by the query. 4. Closing the connection SQLClose is used to close the connection to the database once all the necessary queries have been run.
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|