From Clomosy Docs
(Created page with "To connect to a Local database using the DBSQLiteConnect component in Clomosy, you can follow these basic steps: * Set the SQL Server Connection String:") |
No edit summary |
||
| Line 1: | Line 1: | ||
To connect to a Local database using the DBSQLiteConnect component in Clomosy, you can follow these basic steps: | To connect to a Local database using the DBSQLiteConnect component in Clomosy, you can follow these basic steps: | ||
* Saving database activity: | |||
The Clomosy.EventLog property is set to True, indicating that it will start logging database activity. | |||
Clomosy.EventLog := True; | |||
* Set the SQL Server Connection String: | * Set the SQL Server Connection String: | ||
First you need to prepare the connection string that you will use to connect to the local database. This string should contain the database and connection details such as its password. | |||
Clomosy.DBSQLiteConnect(<span style="color:red">DB, Sifre</span>); | |||
The DB variable is assigned to specify the path to the SQLite database file. This ensures that the database is created in the folder where the application files are located. | |||
* Define the TClSQLiteQuery component: | |||
To execute queries in local, you can use the TClSQLiteQuery component. It is defined within your application. | |||
var | |||
Qry : TClSQLiteQuery; | |||
* Specify the SQL query you want to run: | |||
Qry := Clomosy.DBSQLiteQueryWith('SELECT * FROM table_name'); | |||
Revision as of 11:36, 22 August 2023
To connect to a Local database using the DBSQLiteConnect component in Clomosy, you can follow these basic steps:
- Saving database activity:
The Clomosy.EventLog property is set to True, indicating that it will start logging database activity.
Clomosy.EventLog := True;
- Set the SQL Server Connection String:
First you need to prepare the connection string that you will use to connect to the local database. This string should contain the database and connection details such as its password.
Clomosy.DBSQLiteConnect(DB, Sifre);
The DB variable is assigned to specify the path to the SQLite database file. This ensures that the database is created in the folder where the application files are located.
- Define the TClSQLiteQuery component:
To execute queries in local, you can use the TClSQLiteQuery component. It is defined within your application.
var Qry : TClSQLiteQuery;
- Specify the SQL query you want to run:
Qry := Clomosy.DBSQLiteQueryWith('SELECT * FROM table_name');