SET_DATABASE_NAME¶

Applies to: SQLFlex MYSQLFlex PGFlex

This command overrides the database set in the INT file under DATABASE_SPACE_NAME. Any opens or finds will use the database specified here. This can be used when the database is not stated in the INT file or if the database needs to be dynamically changed for a certain query. If the database is not specified with this command or in the INT file, then the default database for the server will be used. To set the database to be used for embedded SQL statements, use SQL_USE_DATABASE.

Syntax

SET_DATABASE_NAME to {database}

Parameter

Description

database

Name of the database

Example

Login "localhost" "user" "pas123" "sql_drv"
SET_DATABASE_NAME to "TestDB"
Open Customer