access_asp thread: ADODB.Connection (0x800A0CB3) Object or provider is not capable of performing requested operation.
i am getting this error message on my asp page when i execute the
followong code...
ERROR message:
ADODB.Connection (0x800A0CB3) Object or provider is not capable of
performing requested operation.
code:
Sub ListTablesADO()
Dim Conn
Dim TablesSchema
Dim ColumnsSchema
set Conn = Server.CreateObject("ADODB.Connection")
set TablesSchema = Server.CreateObject("ADODB.Recordset")
set ColumnsSchema = Server.CreateObject("ADODB.Recordset")
'Open connection you want to get database objects
'Conn.Provider = "MSDASQL"
'Conn.Open "DSN=mydsn;Database=mydb", "uid", "pass"
'Get all database tables.
Set TablesSchema = Conn.OpenSchema(adSchemaTables)
Do While Not TablesSchema.EOF
'Get all table columns.
Set ColumnsSchema = Conn.OpenSchema(adSchemaColumns, _
Array(Empty, Empty, "" & TablesSchema("TABLE_NAME")))
Do While Not ColumnsSchema.EOF
Debug.Print TablesSchema("TABLE_NAME") & ", " & _
ColumnsSchema("COLUMN_NAME")
ColumnsSchema.MoveNext
Loop
TablesSchema.MoveNext
Loop
End Sub