Topic: Got error by no returning sql!

Hi,
I've got The error attached when I run an sql with no result on the following code :

Main.biggerineu.Caption :=    FloatToStr(SQLExecute ('SELECT MAX(einnahme) FROM Ennahmeausgabe'))+' €';

I'm not knowing Delphi code as well as that can I solve this little problem sad

Thanks a lot

Post's attachments

Attachment icon error.png 6.06 kb, 356 downloads since 2014-10-12 

Re: Got error by no returning sql!

try this:

Main.biggerineu.Caption := SQLExecute ('SELECT MAX(einnahme) FROM Ennahmeausgabe')+' €';
Dmitry.

3 (edited by sonixax 2014-10-12 18:49:35)

Re: Got error by no returning sql!

DriveSoft wrote:

try this:

Main.biggerineu.Caption := SQLExecute ('SELECT MAX(einnahme) FROM Ennahmeausgabe')+' €';

Thanks a lot,
With this code I've got error when I have results !!!
All of my Results are double sad

Re: Got error by no returning sql!

Sorry )

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
var
   s: string;
begin
     s := SQLExecute ('SELECT MAX(einnahme) FROM Ennahmeausgabe');
     Main.biggerineu.Caption:= s +' €';
end;
Dmitry.

Re: Got error by no returning sql!

Thanks a lot