Examples: ListDataSources method
The following agent displays the names of all the data sources on the local machine:
Uselsx "*LSXODBC"
Sub Initialize
Dim con As New ODBCConnection
Dim msg As String
dsnList = con.ListDataSources
For n% = Lbound(dsnList) To Ubound(dsnList)
msg = msg & dsnList(n%) & Chr(10)
Next
Messagebox msg,,"List of DSNs"
con.Disconnect
End Sub