I am really hoping someone can help me out.
I had a SQL Server 2014 database which I used for a desktop application I wrote. After having to expand, I want to convert to MySQL to access the database over the internet.
I user MySQL WorkBench Migration Tool to copy all the tables and data from the SQL Server to the MySQL Server. The only problem is the procedures would not copy, so had to modify them manually.
Example of a Procedure in MySQL:
DELIMITER $$
CREATE DEFINER=`johandre`@`%` PROCEDURE `sp_GetAllOrdersBySuburb`( IN `@SuburbID` VARCHAR(50) )
NO SQL
SELECT * from Orders WHERE DeliverySuburb = @SuburbID$$
DELIMITER ;
The server created the procedures, and all procedures not using IN inputs do show what they must, but the procedures that user inputs give me an error: When calling from PhpMyAdmin SQL: Error
SQL query: Edit Edit
SET FOREIGN_KEY_CHECKS = ON;
MySQL said: Documentation
2014 - Commands out of sync; you can't run this command now
And when I run the procedure in C# Winforms App, it just returns a empty result set.
The code I used to call the procedure:
SET @p0='1'; CALL `sp_GetAllOrdersBySuburb`(@p0);
When I run the code in the procedure as a normal SQL query, then it also returns the data as expected.
I hope this is enough information, and hope this isn't a repeat question, but I did look around and still found no help.
Thank You