Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I'm trying to call a stored procedure from MySQL via an System DSN/ODBC Connection (MySQL ODBC 8.0 ANSI Driver) and I'm getting error 'ERROR [42000] [MySQL][ODBC 8.0(a) Driver][mysqld-8.0.27]You have an error in your SQL syntax'. I can pull data via a dataset using a 'Text' Query Type and typing in a SQL Statement. I would prefer using a stored procedure with parameters that I can pass to it. This way I can reduce the size of the dataset.
I even tried creating a dataset with a 'Table' Query Type and I get error 'An error occured while connecting to the data source. Only the text-based query designer will be available.' I made sure the 'Disable Schema Support' is unchecked in the MySQL ODBC Connector. Any help is appreciated.
Solved! Go to Solution.
Hi @gfross ,
Please use "?" to pass procedure parameters.
MySQL Stored Procedure Call from SSRS through ODBC
Take SQL Server as an example.
exec ProductCategory ?
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I realized that I needed to select a query type of Text and not Stored Procedure. I guess MySQL stored procedures don't like the Stored Procedure type.
The MySQL stored procedure I'm using requires three parameters, so in query designer I have the following:
call sp_Lock(?,?,?)
However I get the following error message.
Hi @gfross ,
Please use "?" to pass procedure parameters.
MySQL Stored Procedure Call from SSRS through ODBC
Take SQL Server as an example.
exec ProductCategory ?
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
69 | |
68 | |
40 | |
29 | |
26 |
User | Count |
---|---|
88 | |
49 | |
45 | |
38 | |
37 |