Bug #3713 An error ocurres when using OpenSchema(adSchemaColumns) with Mysql
Submitted: 11 May 2004 16:25 Modified: 31 Aug 2004 19:01
Reporter: Jaione Arizkuren Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:3.51 OS:w2000
Assigned to: Peter Harvey CPU Architecture:Any

[11 May 2004 16:25] Jaione Arizkuren
Description:
I have a Mysql database and I use it through ODBC in an ASP code.
I would like to get the name of the fields on a table in this database.
If I use the following code:

set v_conexion  = Server.createobject ("adodb.connection")
  v_conexion.open "electricos"
  adSchemaTables = 20

  Set rs = v_conexion.OpenSchema(adSchemaTables)

do while not rs.eof
  if Trim(rs("TABLE_TYPE")) = "TABLE" then
    Response.Write rs("TABLE_NAME") & "<br>"
  end if
  rs.MoveNext
loop
rs.Close
Set rs = Nothing
v_conexion.Close
Set v_conexion = Nothing

I get the name of the tables in the database, whereas if I use this:
 
 adSchemaColumns = 4
 Set rs = v_conexion.OpenSchema(adSchemaTables)

I get the following error :
ADODB.Connection (0x800A0CB3)
Object or provider is not capable of performing requested operation.

What is wrong?

How to repeat:

Executing the following code:

<% Option Explicit %>
<HTML>
<BODY>

<%

Dim v_descrip, v_cod
Dim v_conexion
Dim v_mysql
Dim v_objeto

Dim cn, rs, adSchemaTables, adSchemaColumns, v_espacios

v_espacios = "&#160&#160&#160&#160&#160"

Set cn = Server.CreateObject("ADODB.Connection")
cn.Open "electricos"

adSchemaColumns = 4
Set rs = cn.OpenSchema(adSchemaColumns)
do while not rs.eof
 ' if Trim(rs("TABLE_NAME")) = "fichasrc" then
    Response.Write rs("TABLE_NAME") & V_ESPACIOS & rs("COLUMN_NAME") & "<br>"
  ' end if
  rs.MoveNext
loop
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing
%>
[31 Aug 2004 19:01] MySQL Verification Team
I tested this with Access and wasn't able for to repeat the behavior
reported.

Additional Info:

You should use the below code  like my test:

Set rstSchema = Cnxn.OpenSchema(adSchemaColumns, Array("mysql", "root", "user"))

notice that in your sample is missed the Array part which is make up by
the database_name, owner and table_name