DBCCONNNECT with MariaDB

DBCCONNNECT with MariaDB

ricardo.herrero
Participant Participant
1,828 Views
9 Replies
Message 1 of 10

DBCCONNNECT with MariaDB

ricardo.herrero
Participant
Participant

Hello, 

 

 I have a problem with DBCCONNECT and database palette. I connect with an ODBC driver to a mariaDB instance. It contains many tables. I succeed and the database is connected. Autocad crashed many times but after a while I achieved it. Now I want to make a simple SQL query, "select * from glpi_locations" to get rooms names for a floorplant design. However Autocad always gives the same error, SQL State:37000 and code 1064. It always says there is a problem literally "*) FROM glpi_locations", but I don´t use the brackets, is there anyone who has experience the same error? Thanks everyone for the help!

 

Regards, Ricardo

0 Likes
Accepted solutions (1)
1,829 Views
9 Replies
Replies (9)
Message 2 of 10

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

can you please show screenshots of:

  • the error message you get
  • the dialog you are using for selection (so we can see your filter)
  • the ODBC settings for that connection.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 3 of 10

ricardo.herrero
Participant
Participant
Hello,


We use last version mariadb driver 64 bits and we succeed in ht test connection. We can also see the list of tables, but we can´t even do a select query. Here you can see the query and the result of the execution. MariaDB ODBC setup is default, without checking any extra option except user password, ip and port.

[cid:38f05dea-1782-4da8-8a11-443e11bbb26c]
[cid:ec2288fa-693a-4488-92cb-ed90b2071ef8]

Hope this helps to solve the issue.

Regards, Ricardo
0 Likes
Message 4 of 10

ricardo.herrero
Participant
Participant

Hello, 

We use last version mariadb driver 64 bits and we succeed in ht test connection. We can also see the list of tables, but we can´t even do a select query. Here you can see the query and the result of the execution. MariaDB ODBC setup is default, without checking any extra option except user password, ip and port. 

 

SQL QuerySQL QuerySQL Query resultSQL Query result

 

Hope this helps to solve the issue,

Regards, Ricardo

0 Likes
Message 5 of 10

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

can you try to use a fieldname or 2 instead of the asterisk for <all fields> ... does that work?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 6 of 10

ricardo.herrero
Participant
Participant

Hello, 

 

 We have tested that already, In fact the problem remains, and the message is still exactly the same, with the '*) From  message. I guess there´s a problem in the way the query is sent but I don´t know how to follow it. 

 

Regards, Ricardo 

0 Likes
Message 7 of 10

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

can you test with MS-Access? Start MS-Access with a new database, link to your ODBC connection and create a query in Access with that SQL statement. Does that work?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 8 of 10

ricardo.herrero
Participant
Participant

Hello again, 

 

 We have test with a Access File and we can connect to it. There is no security issues in the Access and the file is local. We have also tried with SQL Server in a remote server and we can connect to the database, we see the list of tables but when we try to see or edit a table there is another error and Autocad crashes again. We post the error here. What do we have to do to connect to these remote professional databases with Autocad? We need to connect to Mysql in order to have one unified DB. Thanks again!

Fallo_SQLServer.png

0 Likes
Message 9 of 10

ricardo.herrero
Participant
Participant

Hello again, 

 

 Do you have any idea of how to debug this issue and connect to Mysql Database? Thanks!

0 Likes
Message 10 of 10

ricardo.herrero
Participant
Participant
Accepted solution

Hello, 

 

 Finally we have found the solution with the help of our technical support, DISPAL SEIDOR. We have found out that there is an initial automatic Autocad Query: Select count (*) from <table>. When we do this in some databases the command count (*) is not properly recognised because the space between. In these databases it should count(*) all together. There is a checkbox in the ODBC for mysql to avoid spaces if necessary. You can find more info in this forum entry. https://forums.autodesk.com/t5/autocad-forum/adolisp-mysql-working-but-weird/td-p/918127

 

Thanks everyone for the help.

Regards, Ricardo