I'm having problems using ADO to return any schema information for a
SQL Server database. Here's my code (VB6):
Dim rs As ADODB.Recordset
Dim con As ADODB.Connection
Set con = New ADODB.Connection
con.Open "Provider=SQLOLEDB.1;" & _
"Integrated Security=SSPI;" & _
"Persist Security Info=False;" & _
"Initial Catalog=Airplanes;" & _
Set rs = con.OpenSchema(adSchemaTables)
The code works for other providers (e.g. Jet and Caché) but for SQL
Server I get RecordCount = -1.
I have tried various recordset property settings, including using a
client side cursor but the results are always the same. I've also run
the instcat.sql script, ...