Closes a managed connection to the database server for the current session.
returnCode = wcDBClose(cntrlHandle, "conn2");
int wcDBClose(void *controlHandle, char *conName)
controlHandle | The handle to the control structure. |
conName | The name to associate with the connection. Must be the conName specified in the wcDBOpen( ) call that opened the connection. If you want to close the connection you opened in your AppPages, conName has to be the connection name you use in AppPages, plus the session ID appended at the end. |
0 | Success. |
Error code | Failure or exception. For a list of possible error codes, see Error Messages. |
The following code shows how wcDBClose( ) is used in an application.
wcGetVariable(wcp, "$SESSION_ID", &sessID); if (sessID!=NULL) sprintf(connName, "MYCONN%s", sessID); wcDBClose(wcp, connName);
wcAppPageConnName( )
wcDBOpen( )
wcDBSet( )