SQLGetDataSources Function |
Namespace: XSharp_VOSQLClasses
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()