Click or drag to resize

SQLDropMyConnection Function

X#
Disconnect the ODBC data source.

Namespace:  VOSQLClasses
Assembly:  VOSQLClasses (in VOSQLClasses.dll) Version: 2.19
Syntax
 FUNCTION SQLDropMyConnection(
	cMySourceName,
	cMyUserID,
	cMyPassword
) AS USUAL CLIPPER
Request Example View Source

Parameters

cMySourceName (Optional)
Type: Usual
The source for this connection.
cMyUserID (Optional)
Type: Usual
cMyPassword (Optional)
Type: Usual
The password that was used to connect to the source.

Return Value

Type: Usual
TRUE if a connection is found; otherwise FALSE.
Remarks
If a connection is found, the use count is decremented by 1. When the use count is 1, the source is disconnected.
Examples
The following example connects to WATCOM; then ends the connection:
X#
1FUNCTION TestConnect()
2LOCAL oConn AS SQLConnection
3oConn := SQLGetMyConnection("sample", "dba", "sql")
4? "SRC=",oConn:DataSource
5? "UID=",oConn:UserID
6? "PWD=",oConn:Password
7SQLDropMyConnection("sample", "dba", "sql")
See Also