I'm trying to get a listing of Databases available from a SQL server.
I've built a ODBC Login form in Excel 2000 using ADODB connections. I can get all the table and field info about a database but I need the list of the Databases.
Here is my connection:
Set pADOcn = New ADODB.Connection
pADOcn.ConnectionString = "DSN=" & prDsnName & ";UID="
& prUserid & ";PWD=" & prPwd
pADOcn.Open
Here is my OpenSchema
Set rstSchema = pADOcn.OpenSchema(adSchemaCatalogs)
The recordset is empty.
Probably has something to do with the DSN inital catalog.
Can anyone shed some light?
Thank You
I've built a ODBC Login form in Excel 2000 using ADODB connections. I can get all the table and field info about a database but I need the list of the Databases.
Here is my connection:
Set pADOcn = New ADODB.Connection
pADOcn.ConnectionString = "DSN=" & prDsnName & ";UID="
& prUserid & ";PWD=" & prPwd
pADOcn.Open
Here is my OpenSchema
Set rstSchema = pADOcn.OpenSchema(adSchemaCatalogs)
The recordset is empty.
Probably has something to do with the DSN inital catalog.
Can anyone shed some light?
Thank You