Functions.SQLGetDataSources 方法 |
命名空间: VOSQLClasses
1FUNCTION TestConnect() 2 LOCAL wCount AS DWORD 3 LOCAL aSources AS ARRAY 4 LOCAL oConn AS SQLConnection 5 // 获取源的数组 6 aSources := SQLGetDataSources() 7 // 列出它们 8 ? "ODBC Sources..." 9 for wCount := 1 to ALen(aSources) 10 ? aSources[wCount] 11 next 12 // 连接到源列表 13 oConn := SQLOpenConnection() 14 // 将其设置为默认连接 15 SQLSetConnection(oConn) 16 // 断开连接 17 oConn:Disconnect()