adoConnClose
Previous Topic  Next Topic 

Synopsis:

       adoConnClose(handle)

Arguments:

       handle - The connection handle.


Description:   This function closes the connection specified by handle  (if it is open) and then releases the underlying ADO _Connection object.          Note that a task can only close public connections or those private connections that it opened itself.              When a connection is closed then all underlying recordsets that rely on this connection will also be closed and released.      If any other tasks are using the connection or any recordsets dependant on this connection then any subsequent calls attempting to use these objects will result in an error.               Careful co-ordination should be carried out between tasks if a public connection is closed since another adoConnOpen() might result in the same handle being allocated, then any tasks that were using the original handle will suddenly have access to the new connectio data instead, with possible unexpected results.


Note that when a task stops through an explicit kill request, or a stop or restart command, or by reaching the end of the program, or by 'chaining' to another program then all open private connections and recordsets will be automatically closed and released.


Returns:   Returns 0 upon success or a negative error code.   If ADOERR_COMERR is returned, then the underlying ADO error can be obtained by calling adoLastError()