[ODBC-109] ado odbc creates syntax error under win10 Created: 2017-08-24 Updated: 2022-08-01 Resolved: 2022-08-01 |
|
| Status: | Closed |
| Project: | MariaDB Connector/ODBC |
| Component/s: | None |
| Affects Version/s: | 2.0.15 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Ph. Baumgartner | Assignee: | Lawrin Novitsky |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Win10, MariaDB 10.2.7 |
||
| Attachments: |
|
| Description |
|
When I run a simple test script to add a record with ADO under Win10 ODBC creates the following query: The syntax is rejected by the MariaDB server for good reasons. Surprisingly the syntax is ok under Win7. I add the ODBC trace for the Win10 test script. |
| Comments |
| Comment by Lawrin Novitsky [ 2017-08-24 ] |
|
Thank you for your reports. |
| Comment by Ph. Baumgartner [ 2017-08-28 ] |
|
Actually I used more or less the following script for my test: https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-examples-programming-vb-ado.html For MariaDB I have adjusted the connection string to the following values: conn.ConnectionString = "DRIVER= {MariaDB ODBC 2.0 Driver};" _ And I switched to The create recordset statement was produced by the following code: rs.AddNew The create table statement is the following: 'create table Do you think this information is good enough for your analysis? |
| Comment by Lawrin Novitsky [ 2017-09-07 ] |
|
I usually test on W10, and I tried with adUseClient - could not re-create your problem. Apparently that is not Windows version what matters. I'd imagine that ADO library version is the best candidate. Could you please try if the problem repeatable with MySQL connector? and if it is - does NO_CATALOG=1 in the connection string cures that. I saw in the log, that your application tries to connect using MySQL 5.2 connector, but driver manager cannot find or load it |
| Comment by Ph. Baumgartner [ 2017-09-08 ] |
|
This is very funny. I had MySQL 5.2 connector installed a while ago, but uninstalled it half a year ago. Now I have only the MariaDB 2.0 connector installed. Nevertheless the Win10 ODBC manager still shows a MySQL 5.2 connector under section driver. 2 questions: b) How can I clean the leftover entries for the MySQL 5.2 connector in the ODBC manager? I will try the "no-catalog" parameter after I managed to clean the odbc entries... |
| Comment by Lawrin Novitsky [ 2017-09-08 ] |
|
I don't know what your application does DSN's in ODBC.INI, but also they can be under HKEY_CURRENT_USER If NO_CATALOG helps with mysql connector(if it's vulnerable for the same problem), then probably implementing the same functionality will be the solution for your problem |
| Comment by Ph. Baumgartner [ 2017-09-11 ] |
|
I always use the same test program: Thanks to your instructions I could delete the obsolete entries in the odbc manager. In a first step I have tested the same code as before with the same result. Therefore the mysql driver entries did not have any effect - same error. |
| Comment by Lawrin Novitsky [ 2017-09-11 ] |
|
If you didn't do other modifications to the script,then it's hard to imagine why would it connect using different drivers. And one more quick question - don't you get exception that "id does not have default value" with default table structure from that example script? because it's not auto_increment. Or you made modifications to it? |
| Comment by Ph. Baumgartner [ 2017-09-12 ] |
|
You are right - sorry that I did not mention it. I use the following statement: 'create table Still trying to get the mysql odbc driver to work. As soon as I have results, I will let you know. |
| Comment by Ph. Baumgartner [ 2017-09-12 ] |
|
I managed right now to run the same test with the mysql ODBC Driver (5.3.9) on the same Win10 machine. I did not put the no_catalog-option, but it worked without problems. I will attach the sql trace and the adapted vb script. |
| Comment by Lawrin Novitsky [ 2017-09-12 ] |
|
Interesting. Ok, I will investigate more, compare logs, and will try to figure out what causes double dot. Thank you for your help! |
| Comment by Ph. Baumgartner [ 2017-11-17 ] |
|
Any progress on that issue? Other people experiencing this issue? |
| Comment by Lawrin Novitsky [ 2017-11-17 ] |
|
Sorry, there was no progress on my side on this issue. And no, other people did not report similar issue. |
| Comment by Lawrin Novitsky [ 2018-02-01 ] |
|
I have uploaded library with one thing fixed, which I think is best candidate to be the reason of your problem. Since I cannot repeat it, could you please check if it has any effect? and maybe, in best case, fixes the problem. |
| Comment by Lawrin Novitsky [ 2018-03-23 ] |
|
Did you have the chance to try? Latest releases(3.0.3 and 2.0.16) contain this change as well |
| Comment by Ralf Gebhardt [ 2021-03-29 ] |
|
Hi baumgaphil, have you had a chance to verify if the issue still occurs for you? |
| Comment by Ralf Gebhardt [ 2022-07-18 ] |
|
In two weeks, we will close this issue as incomplete since it will have spent a long time waiting for feedback. |