Bug #4564 ADO connection.OpenSchema returns field and tablenames with backticks
Submitted: 15 Jul 2004 14:02 Modified: 29 Nov 2004 16:03
Reporter: Ronald van Raaij Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:3.51.07 OS:Windows (Windows 2000)
Assigned to: CPU Architecture:Any

[15 Jul 2004 14:02] Ronald van Raaij
Description:
An upgrade of our server from 4.0.13 to 4.0.20 gave the ptoblem that the following statement:
Set rstSchema = conn.OpenSchema(adSchemaForeignKeys, Array(Empty, Empty, strTableName, Empty, Empty, Empty))

returned a recordset in which the tablenames were prefixed by the backtick character, so it changed from
Tabelname
to
'Tablename

and the fieldnames were serrounded by backticks so it changed from
Fieldname
to
`Fieldname`

This may be by design, however it broke my application, since fieldnames without backicks were assumed.

How to repeat:
see above
[1 Sep 2004 4:22] MySQL Verification Team
Please test with latest 3.51.09 driver release.

Thanks in advance.
[11 Oct 2004 21:42] Harun Eren
The MyODBC-Funktion SQLForeignKey() returns the following results (they are
wrong):

The returning values for the following columns at the results are incorrect,
"PKTABLE_CAT" (Position 1), "PKTABLE_NAME" (Position 3),
"PKCOLUMN_NAME" (Position 4), "FKCOLUMN_NAME" (Position 8).

Call MyODBC-Function SQLForeignKeys() and returns Data:

SQLForeignKeys:
`testdbs, , parent`, `id`, testdbs, , child, `parent_id`, 1, 1, 1, NULL, NULL,7
1 row fetched from 14 columns.
 
The backticks are incorrectly returning in the result for identification the 
foreign keys. It must be changed for correct working in the MyODBC
Connector/ODBC.
[29 Nov 2004 16:03] Harun Eren
Hi,

bug is fixed with myodbc Version 3.51.10.

The result looks correct, for example:

"PKTABLE_CAT", "PKTABLE_SCHEM", "PKTABLE_NAME", "PKCOLUMN_NAME", "FKTABLE_CAT", "FKTABLE_SCHEM", "FKTABLE_NAME", "FKCOLUMN_NAME", "KEY_SEQ", "UPDATE_RULE", "DELETE_RULE", "FK_NAME", "PK_NAME", 
"DEFERRABILITY"
TRUNC: "", "", "parent", "id", TRUNC: "", "", "child", "parent_id", 1, 1, 1, TRUNC: "", TRUNC: "", 7
1 row fetched from 14 columns.

Regards,