If I execute this command in a sql file connecting to mysql:
delimiter //
I get this error in the output window for
Core Lab Database Developer Tools:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'delimiter //
This command works fine for MySQL 5 in any other context.
I am using Visual Studio 2005 Professional Edition,
MySQLDirect .NET Data Provider Professional version 3.50.10,
and MySQL Developer Tools version 1.70.28.
Error with SQL script from within Visual Studio 2005 IDE
Must have to do with delimiter being mysql client command and not a sql statement
If this is because "delimiter" is mysql client command then how would one execute a CREATE PROCEDURE that includes semicolons from within VS 2005 IDE. Is there some equivalent to allow for semicolons within a sql statement.
To execute SQL which contains compound statements you should add '/' char to the end of SQL.
Example:
Example:
Code: Select all
create procedure in_out_inout_params(in in_param int, out out_param int, inout inout_param int)
begin
set out_param = in_param * 4;
set inout_param = inout_param * 2;
end
/