Connecting and Disconnecting Databases

You can connect to databases in your ESQL application in two ways:

Of the two techniques, calling sqlconn() provides greater flexibility because you are already logged in to an ESQL session when you make the call. If an error occurs while calling sqlconn(), you can recover and retry the database connection without ending your ESQL session. Also, using both the sqlconn() and sqldiscon() functions, you can connect and disconnect databases within the same session as often as you want. However, if a database connection attempt fails while calling sqllogin(), your ESQL session effectively ends and you must restart your application to retry the connection. For more information on sqllogin(), see the "Starting and Ending an ESQL Session" section.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095