StoredProcedure not shown at design neither runtime
Posted: 17.02.2009, 07:05
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:
In this one, we catch the error : No parameter defined for 'MODEL';
but when we use the zQuery1, this code :
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 ?
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
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;
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;
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 ?
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