Creating a trigger using ODBC execute #1225
Closed
TopperTycho
started this conversation in
General
Replies: 3 comments 4 replies
-
How exactly does it not work? |
Beta Was this translation helpful? Give feedback.
3 replies
-
It looks like you may be encountering a limitation of the ODBC driver described here: https://mariadb.com/kb/en/about-mariadb-connector-odbc/#multiple-statement-execution |
Beta Was this translation helpful? Give feedback.
1 reply
-
Try using MariaDB ODBC Connector 3.2.0-Development version. I seems to work for me. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using pyodbc with the 10.3.32-Mariadb driver, I downloaded. My MariaDB is located on a NAS in my local network.
I am automating a database so all tables can be automatically generated for a personal project. So I don't have to make all the tables and their links by hand. Here I want to use a trigger for each data table so a DateTime value is automatically added to it.
Found a SQL query (see below) that can make the trigger which works when using an external program (HeidiSQL) to send SQL queries to the database. But trying to implement this query in my Python code doesn't work. I guess it has something to do with the end-of-statement symbols which is why the DELIMITER is added to the query. So the whole statement could be executed as one big query.
Does anyone have an idea or solution for implementing this in my Python code?
Beta Was this translation helpful? Give feedback.
All reactions