Go to Scriptcase store

# Windows

The ODBC Generic connection is normally used to create connections with the databases: dBase (.dbf), Dataflex, Paradox, Visual FoxPro, etc.

You only need have the corresponding ODBC driver with the database installed.

#### If you are using your own previously configured environment, you will need to enable the ODBC extension in PHP.

## Generic ODBC

### Setting up ODBC on Windows

The automatic installation already comes with the ODBC only needing to connect with the database with ScriptCase.

## Creating a Connection with ScriptCase

- Access ScriptCase using the URL http://127.0.0.1:8092/scriptcase
- After accessing ScriptCase, access or create a new project, click on the new connection icon or access “Database > New Connection”

Creating a new connection

- After that, you will see a page with all the database connections that you can create. Select a “ODBC” connection

Selecting a Windows database connection

- New connection : You will place the information of the connection to your database here:

Connecting with Windows database

- Connection Name : Defines the name of your new connection.
- DBMS Driver : Select the Generic ODBC.
- Specific driver : Defined as Generic ODBC, allows you to connect to specific Data Sources: DBF, FileMaker, Progress or Visual FoxPro.
- ODBC Name : On this option, you will inform the name of the Data Source that you have created.
- Username : Inform the username of the Windows database, only if there are any.
- Password : Inform the password of the Windows database, only if there are any.

- Test Connection : Displays a message of the status of the connection if successful or not.

- For more options on connecting, click on the Advanced tab:

Advanced setup for the Windows database

- Decimal Separator - Select the separator type, between a dot or a comma.
- Persistent Connection - Persistent Connection are connections that do not close when finishing a script.

- Use the schema before table name - Allows the use of schema before the name of the tables.

- Filter : Accessing this tab, we can setup which tables will be listed on this connection:

Filtering the Windows database

- Show - Allows the display of the the filters on the tables, views, System Tables and procedures.
  - Tables - Allows to setup the display of Tables from your database.
  - Views - Allows to setup the display of Views from your database.
  - System Tables - Allows to setup the display of System Tables from your database.
  - Procedures - Allows to setup the display of Procedures from your database.
- Searches - Allows to define which tables and Owner will be displayed.
  - Tables - Allows to define a prefix (prefix%) or name of the tables for display.
  - Owner - Allows to define the owner of the tables for listing.
  - Show - Allows to define what will be displayed or not from the table an owner’s setup.

### Advanced

In this tab, you have access to specific settings for the connection. The settings made in this session impact the data display and application performance.

![Advanced database connection configuration][conexao_avancado]

- Decimal Separator: Select the type of separator for decimal records, between comma and period.
  - By default, the `.` dot is selected as a separator .
- Persistent Connection: Define whether connections will be terminated after the execution of your scripts in Scriptcase applications.
  - By default, Scriptcase disables this option .
- Use the schema before the table name: Define whether the database schema will be displayed before the table names.
  - By default, Scriptcase enables this option .

### SSH

Here are the SSH options available in the image and their descriptions regarding database connection:

#### Use SSH

Enables or disables the SSH tunnel for database connection. When enabled, the database connection will be routed through the SSH server.

#### SSH Server

The IP address or hostname of the SSH server that will be used for tunneling. This is the machine that will act as a bridge to access the database securely.

#### SSH Port

The port used to connect to the SSH server.

#### SSH User

The username used to authenticate with the SSH server. This user must have permissions to establish an SSH connection.

#### Authentication method

You can choose two options: password or certificate. When you choose one of the options, a new field will appear below for the configuration.

#### Private cert. file

The private key file used for authentication if the SSH server requires key-based authentication instead of a password.

#### Local port for port forwarding

The local port on the client machine that will be used for forwarding database traffic through the SSH tunnel. This port acts as a bridge between the database client and the remote database.

#### Database server from SSH

The hostname or IP address of the database server as seen from the SSH server. This is necessary when the database is only accessible within the SSH server’s network.

#### Database port from SSH

The port of the database server that will be accessed through the SSH tunnel. This should match the database service’s listening port.

.png