I'm using mydac84 with Delphi XE7 (running on Windows 8.1 64 bit) and I'm having an issue when using the MyStoredProc component with a stored function. In a test program, I'm using the following function
Code: Select all
CREATE DEFINER = 'root'@'localhost' FUNCTION `f_test`(
`a` INTEGER
)
RETURNS TINYINT(1)
DETERMINISTIC
CONTAINS SQL
SQL SECURITY DEFINER
COMMENT ''
BEGIN
RETURN if(a > 10, 1, 0);
END;Code: Select all
MyStoredProc1.ParamByName('a').asInteger := SpinEdit1.Value;
if MyStoredProc1.Active then MyStoredProc1.Refresh else MyStoredProc1.Active := true;
if MyStoredProc1.ParamByName('result').asBoolean then
ShowMessage('true')
else
ShowMessage('false');If I run the component in design mode, it correctly returns a 0 or 1 depending on the value of a.
In previous versions with Delphi XE6 it worked correctly from within the program.
I have tried using a dbExpress (dbxmda65) and this works correctly, but I have quite a few instances of using stored functions in my program and don't really want to have to track them all down and rewrite them.
Can anyone confirm that this is a bug?
Thanks
Robert