StoredProcedure not shown at design neither runtime

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
manz
Fresh Boarder
Fresh Boarder
Posts: 24
Joined: 02.06.2008, 03:58
Location: Cilegon
Contact:

StoredProcedure not shown at design neither runtime

Post by manz »

Dear All,

We using D2007 December Update, with Mysql and Zeos 6.6.4-stable.

Currently we using the stored procedure, but at zStoredProc1.StoredProcName (at design time) not shown, even the connection already connected to the database.

This zStoredProc1 at runtime want to use the parameters:

Code: Select all

with zStoredProc1 do
begin
   StoredProcName := 'sp_BalanceReport';
   ParamByName('MODEL').AsString := Mode;  <-- Point the error
   ParamByName('BegDate').AsDate := Manz.IIf(cxCheckBox1.Checked, cxDateEdit3.Date, d1);
   ParamByName('EndDate').AsDate := d2;
   ParamByName('BegMatNum').AsString := quotedStr(c1);
   ParamByName('EndMatNum').AsString := quotedStr(c2);
   ParamByName('BinLoc').AsString := quotedStr(cxTextEdit3.Text + '*');
   active := true;
end;
In this one, we catch the error : No parameter defined for 'MODEL';

but when we use the zQuery1, this code :

Code: Select all

with zQuery1, SQL do
begin
      Clear;
      active := false;
      text := format('call sp_BalanceReport(%s, %s, %s, %s, %s, %s)',
                     [ quotedStr(Mode), Manz.IIf(cxCheckBox1.Checked, Manz.D(cxDateEdit3.Date), Manz.D(cxDateEdit1.Date)) ,
                      Manz.D(cxDateEdit2.Date), quotedStr(cxLookupComboBox1.Text), quotedStr(cxLookupComboBox2.Text),
                      quotedStr(cxTextEdit3.Text + '*')]);
     active := true;  <-- Point Error
end;
In this query has an error shown :

Exception class EZSQLException with message 'SQL Error: PROCEDURE logistic.sp_BalanceReport can't return a result set in the given context'. Process Logistic.exe (2660)

When we test this sp on console, sqlmanager, even at navicat, the sp run correctly, no error, But, on Delphi ... error ..

Can someone help me for this kind of error ? :cry:

Version:
MySQL: 5.1.30-community
CodeGear™ Delphi® 2007 for Win32® R2 Version 11.0.2902.10471
ZeosLib 6.6.4-stable

Thanks
Man'z
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Hi Manz, The Stored Procedure component isn't implemented for mysql. So this will not work anyway.

If you'll look around the mysql section of the forum you'll probably find more comments on the stored procedure problem for mysql. Part of the problem is mysql can return multiple resultsets with different layouts from a stored proc. So we see no reasonable way to implement this in zeoslib. It MAY be possible to implment this using the dbc interfaces directly, but I've no experience doing that.

Mark
Image
Post Reply