Code: Select all
procedure TForm2.Button1Click(Sender: TObject);
begin
StKosten.Prepare;
StKosten.Params[0].Value := 34;
StKosten.ExecProc;
try
with memo1.Lines do
begin
add(floattostr(StKosten.FieldByName('nettoweigth').AsFloat));
add(floattostr(StKosten.FieldByName('palweigth').AsFloat));
add(floattostr(StKosten.FieldByName('totalsales').AsFloat));
end;
except
showmessage('reading failed');
end;
end;
Code: Select all
procedure TForm2.StKostenAfterExecute(Sender: TObject; Result: Boolean);
begin
try
with memo1.Lines do
begin
add(floattostr(StKosten.FieldByName('nettoweigth').AsFloat));
add(floattostr(StKosten.FieldByName('palweigth').AsFloat));
add(floattostr(StKosten.FieldByName('totalsales').AsFloat));
end;
except
showmessage('reading failed');
end;
end;
I really don't understand why. Are the events in TMyStoredProc out of order (not working)?---------------------------
Debugger Exception Notification
---------------------------
Project Project3.exe raised exception class EDatabaseError with message 'StKosten: Field 'nettoweigth' not found'.
---------------------------