1
needing a little help here I have this function on the datasnap server
//query that is in fqy_SaldoRs is "PRC_SALDO_MOTOQUEIRO :pMoto" which is nothing more than a query that takes an integer type parameter and returns a double
function TServerMethods1.fnc_RetornaSaldo(matricula: Integer): Boolean;
begin
Result := False;
with fqy_SaldoRs do
begin
Close;
Params[0].AsInteger := matricula;
Open;
Result := True;
end;
fqy_SaldoRs.Close;
end;
The server and datasnap webbroker how do I pick up this return from the client side ???
I guess you just change the function
fnc_RetornaSaldo
exchanging the return ofBoolean
forDouble
and in theResult
put the value returned by Query.– Daniel Grillo
I think that this does not change at least in my understanding if the select returns something is because it is true just as if it returns 1 would be an integer I could perfectly have declared this Function as integer. The question is la on the client how do I get the result ?
– Regis Faria
Dude, that code of yours is kind of messed up. In this structure,
Result
will always beTrue
, unless an error occurs before theResult := True;
. In your case, I think I could change theTrue
fornot(IsEmpty)
.&#Another question is the name of his method, apparently by name I hope he returns the Balance to me, and he will only tell me if I have data in the balance table for a certain enrollment. Now let’s actually ask your question. Do you get anything in Client? How is the call of this method being made? There are other methods on your server that are working?– Victor Tadashi
You have already updated the server functions in the client?...
– Jefferson Rudolf