sqldiscon() — Disconnect a Database
Disconnects a single database from your program.
This function returns normalized values. For more information, see the function return values in the "General Diagnostics" section in this chapter:
pldbname
Pointer to the logical name of the connected database.
NOTE
EXAMPLE
- Work done while a database is connected is not committed when you call
sqldiscon()
. You must commit work using the COMMIT WORK statement or a call tosqlcommit()
before you disconnect the database, or before exiting from your program. Otherwise, the disconnection does not occur and your open transaction is rolled back. Databases do not disconnect until a transaction ends. Therefore, any disconnections pend until the application encounters a COMMIT WORK or ROLLBACK WORK statement or ansqllogout()
call (which automatically rolls back all work). If the transaction does not complete and you reconnect the database, the disconnect never actually occurs.This example disconnects the
dbase1
database:
SEE ALSO
sqlconn() — Connect Database(s), the DISCONNECT statement in the Progress Language Reference for more information on disconnecting from a database.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |