Click or drag to resize

SQLOpenConnection Function

X#

Note: This API is now obsolete.

Connect to a list of ODBC sources.

Namespace:  XSharp_VOSQLClasses
Assembly:  XSharp.VOSQLClasses (in XSharp.VOSQLClasses.dll) Version: 2.19
Syntax
[ObsoleteAttribute]
 FUNCTION SQLOpenConnection() AS SQLConnection
Request Example View Source

Return Value

Type: SQLConnection
An SQLConnection object.
Remarks
SQLOpenConnection() displays a dialog box listing all of the sources that have been installed and prompts you to select one.
Examples
The following example tests connection utility functions:
X#
 1FUNCTION TestConnect()
 2LOCAL wCount AS DWORD
 3LOCAL aSources AS ARRAY
 4LOCAL oConn AS SQLConnection
 5// Get an array of sources
 6aSources := SQLGetDataSources()
 7// List them
 8? "ODBC Sources..."
 9for wCount := 1 to ALen(aSources)
10? aSources[wCount]
11next
12// Connect to a list of sources
13oConn := SQLOpenConnection()
14// Make it the default connection
15SQLSetConnection(oConn)
16// Disconnect
17oConn:Disconnect()
See Also