Bug #41418 | php and asp return different results, show create table query | ||
---|---|---|---|
Submitted: | 12 Dec 2008 6:26 | Modified: | 16 Dec 2008 5:44 |
Reporter: | Stuart Palmer | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | Connector / ODBC | Severity: | S2 (Serious) |
Version: | 3.51 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | ?????, ASP, php, question marks, SHOW CREATE TABLE |
[12 Dec 2008 6:26]
Stuart Palmer
[12 Dec 2008 8:27]
Tonci Grgin
Hi Stuart and thanks for your report. This is actually duplicate of Bug#10491, see the discussion there. I will just quote part of my own hidden comment: "This problem represents grave issue for all connectors. They can't work around it, at least not reliably. Ad hoc user queries like this do not allow connector to distinguish between "SHOW CREATE TABLE", where it should treat BINARY as UTF8, and "SELECT varbinary_col FROM some_table", where it really should be binary." Now, every connector is free to choose how to deal with this problem. PHP chooses to ignore and c/ODBC devs decided to add special flag "Always handle binary function result as character data" which you need to check in DSN or add to connection string in order for your sample to work. Closing the report now.
[16 Dec 2008 5:44]
Stuart Palmer
I have searched online on how to set the driver to "Always handle binary function result as character data" but I cannot find any information on this that works. In my case I am using a connectionstring rather than DNS. How do I add this functions to my connection string in order to get valid results? I have found references to 'a check box' but I am unsure where this box is to check to enable this, so I am a little in the dark as to how to fix this. Many thanks Stuart Palmer