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 callingsqlconn()
, you can recover and retry the database connection without ending your ESQL session. Also, using both thesqlconn()
andsqldiscon()
functions, you can connect and disconnect databases within the same session as often as you want. However, if a database connection attempt fails while callingsqllogin()
, your ESQL session effectively ends and you must restart your application to retry the connection. For more information onsqllogin()
, 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 |