Rexx - Closing a Connection


Advertisements

The following command can be used to close a connection to the database.

Syntax

SQLDisconnect(cname) 

Parameters

  • cname − This is the name of the connection.

Return Value

A value equal to 0 will mean that the command was successful.

Example

/* Main program */ 
Call RxFuncAdd 'SQLLoadFuncs', 'rexxsql', 'SQLLoadFuncs' 
Call SQLLoadFuncs 

if SQLConnect(c1,'testuser','test123','testdb') == 0 then say 'Connect Succedded' 
if SQLDisconnect(c1) == 0 then say 'Disconnected'

The output of the above program would be as shown below.

Connect Succedded 
Disconnected
rexx_databases.htm
Advertisements