In PowerBuilder you work within an existing database. With one exception, creating or deleting a database is an administrative task that is not performed directly in PowerBuilder. The one exception is that you can create and delete a local Adaptive Server Anywhere database from within PowerBuilder.
For information about creating and deleting other databases, see your DBMS documentation.
To create a local Adaptive Server Anywhere database:
From the Objects view, launch the Create ASA Database utility included with the ODBC interface.
The Create Adaptive Server Anywhere Database dialog box displays.
In the Database Name box, specify the file name and path of the database you are creating.
If you do not provide a file extension, the database file name is given the extension DB.
Define other properties of the database as needed.
If you are using a non-English database, you can specify a code page in the Collation Sequence box.
For complete information about filling in the dialog box, click the Help button in the dialog box.
Click OK.
When you click OK, PowerBuilder does the following:
Creates a database with the specified name in the specified directory or folder. If a database with the same name exists, you are asked whether you want to replace it.
Adds a data source to the ODBC.INI key in the registry. The data source has the same name as the database unless one with the same name already exists, in which case a suffix is appended.
Creates a database profile and adds it to the registry. The profile has the same name as the database unless one with the same name already exists, in which case a suffix is appended.
Connects to the new database.
To delete a local Adaptive Server Anywhere database:
Open the Database painter.
From the Objects view, launch the Delete ASA Database utility included with the ODBC interface.
Select the database you want to delete and select Open.
Click Yes to delete the database.
When you click Yes, PowerBuilder deletes the specified database.