MySQL StoredProcedure

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Sir Rufo
Posts: 1
Joined: Tue 22 Nov 2011 11:38

MySQL StoredProcedure

Post by Sir Rufo » Tue 22 Nov 2011 12:19

I have a SP on MySQL-Server

Code: Select all

CREATE DEFINER = `root`@`%` PROCEDURE `NewProc`(OUT ID varchar(36))
BEGIN
	#Routine body goes here...
  SET ID = UUID();
END;
When trying to access this via TUniStoredProc i will get an error during runtime. A quick check inside the IDE works fine.

SQL.Text in TUniStoredProc (auto-generated by TUniStoredProc)

Code: Select all

CALL GetUUID(@ID); SELECT @ID AS '@ID'
And thats the Exception at Runtime:

Code: Select all

EUniError: 
#42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT @ID AS '@ID'' at line 1
So what's the difference between Execute in DesignTime and RunTime?

AndreyZ

Post by AndreyZ » Wed 23 Nov 2011 14:26

Hello,

I cannot reproduce the problem. Please specify the following:
- the exact version of MySQL server you are using. You can learn it from the Info sheet of TUniConnection Editor;
- the exact version of UniDAC. You can learn it from the About sheet of TUniConnection Editor;
- the exact version of your IDE.

Post Reply