I try to execute some code on the server coming from a android tablet, calling the function with sessions and it works very well.
When the function comes back with the Id of newly created record, I get strange errors.
procedure TDMA.CreateAccount(Nit: Int64; Nombres, Apellidos, Clave: String);
var FI : TRtcFunctionInfo;
begin
FnTaxiId := -1;
FI := CM.Prepare('CreateAccount');
FI.asLargeInt['Nit'] := Nit;
FI.asString['Nombres'] := Nombres;
FI.asString['Apellidos'] := Apellidos;
FI.asString['Clave'] := Clave;
CM.Call(Result_CreateAccount);
ShowMessage(FnId.ToString);
end;
procedure TDMA.Result_CreateAccountReturn(Sender: TRtcConnection; Data, Result: TRtcValue);
var i : Integer;
_Result : TRtcRecord;
begin
If Result.isType = rtc_Exception Then
ShowMessage(Result.asString)
Else begin
_Result := Result.asRecord;
i := _Result.asInteger['Id'];
end;
end;
I tried blocking, non-blocking, Multithreaded...
When I put a breakpoint in the result event :
Any ideas ?
Thanks in advance, Helge