Please enable JavaScript to view this site.

ESL Documentation

Direct Command

Connect to a database.

startdb DATABASE USERID PASSWORD

DATABASE 

A string value representing the name of the database.

USERID

(DB/2 only) A string value containing the User Identifier.

PASSWORD

(DB/2 only) A string value containing the password associated with the User Id.

Description

Use of this command depends on the type of database to which you wish to connect.

DB/2

You must successfully issue this command before any dynamic SQL statements can be processed.

SQL Server & Sybase

This command serves the same purpose as the TRANSACT-SQL use command. Before a startdb command is issued (or a TRANSACT-SQL use statement is executed), the application is connected to the User's default database.

Oracle

This closes the current database (using stopdb), then switches to another database, using the same user name, password, etc.

ODBC

If the specified database is different, from the one currently in use, this closes it (using stopdb), then switches to the specified database. Before a startdb command is issued, the application is connected to the User's default database.

Example

response to start

   start local SQL "eslsqldb"

   send "startdb sample db2admin mypassword\n" to SQL