Windows
In Scriptcase, we only have one driver to connect to SQLite: SQLite PDO. If you are using your own pre-configured environment, the SQLite extension must be enabled manually in PHP.
Prerequisites
If you are using a manual installation on Windows, you will need to enable the SQLite extension in the php.ini file. See below for how to do this.
NOTE: If you are using an automatic Scriptcase installation, the SQLite driver will be enabled automatically.
1 - In the php.ini
file, located under C:\php
, uncomment the line for the SQLite extension pdo_sqlite by removing the ;
from the start of the line. See the example below:
2 - Restart the Apache service using the Task Manager.
-
Open Task Manager and click on the Services tab.
-
Look for the
Apache2.4
orApacheScriptcase9php73
service and right-click on this service, then Restart.
Creating a connection in Scriptcase
Here is how to create a connection in your Scriptcase project using the SQLite database.
1 - Access any project from within your Scriptcase.
2 - Click on the New Connection icon to create a connection.
or go to the Database > New Connection menu.
After that, a new page will appear with all the database connections.
3 - Select the SQLite connection.
Connection
Enter the parameters for connecting to your SQLite database as follows:
-
Connection Name: Set the name of your new connection. By default, Scriptcase adds the prefix conn along with the database name.
-
DBMS Driver: Select the SQLite Driver used to connect. By default, the driver will be SQLite PDO.
-
Server/Host(Name or IP): Enter the full path to your SQLite database file. EX:
C:\Apache24\htdocs\client_data
-
Password: Enter the password to complete the authentication process if you have it set for your DB file.
-
Test Connection: Click this button to get a response from the Scriptcase request to see if the parameters you entered are correct.
Filter
By accessing this tab, you can configure which items from the Database will be displayed in the connection, depending on the owner or not.
Show
Allows the SQLite connection to see tables, views, system tables and procedures depending on the items selected by the user. By default, the items Tables and Views are already selected by Scriptcase.
- Tables: By selecting this option, the tables in your database will be displayed.
- By default, Scriptcase enables this option.
- By default, Scriptcase enables this option.
- Views: By selecting this option, the views of your database will be displayed.
- By default, Scriptcase enables this option.
- By default, Scriptcase enables this option.
-
System tables: By selecting this option, the system tables of your database will be displayed.
- Procedures: When you select this option, the procedures from your database will be displayed.
Searches
Allows you to define which tables and owners are displayed.
- Tables: You can define in this option which tables will be displayed. The setting can contain a
PREFIX%
or name of the tables to be displayed.- By default, Scriptcase leaves this option empty.
- Ex:
- Owner: Inform the user who sees the inserted tables for display.
- User must be in capital letters, as in the example above
- User must be in capital letters, as in the example above
- Show: Choose whether tables are displayed for the owner entered.
NOTE: By using table filtering, you eliminate unnecessary tables for your project and improve the performance of your database connection.
Advanced
In this tab, you have access to settings specific to the connection. Changes made in this section impact the data display and performance of the application.
-
client_encoding: Select the encoding used in your database. In the example above, we used client_encoding UTF-8.
- Decimal separator: Select the separator type for decimal records, between comma and period.
- By default, period
.
is selected as the separator.
- By default, period
- Persistent connection: Set whether connections will be closed after your scripts run in Scriptcase applications.
- By default, Scriptcase disables this option.
- By default, Scriptcase disables this option.
- Use the schema before table name: Set whether the database schema is displayed before the table names.
-
By default, Scriptcase enables this option.
-
Ex:
-
Doubts or Connection Problems? Contact our Support Team in case of connection problems or questions regarding this database.