Original: http://www.cnblogs.com/delphi007/p/3346084.html
Known issues with Android under Stringgrid:
By clicking on the value of the corresponding row is a problem, in win under the normal debugging, under the Android location is not allowed
Second, client development
1, new project
2, adding related client controls Trtchttpclient,trtcclientmodule,trtcresult (2)
3, set the relevant properties Trtchttpclient server address, port, Trtcclientmodule client settings, and a modulefilename
4, write Trtcresult code
Trtcresult code for Select
Procedure Tform1.rtcrslt1return (sender:trtcconnection; Data,
Result:trtcvalue);
var I:integer;
Begin
If Result.istype=rtc_exception Then
Begin
Btn1. text:= ' ERROR ';
End
else if Result.istype=rtc_null then
Begin
Btn1. text:= ' NULL ';
End
Else
Begin
Btn1. text:=result.asstring;
i:=0;
Result.asDataSet.First;
While not Result.asDataSet.Eof do
Begin
Strngrd1. Cells[0,i]:=result.asdataset.fieldbyname (' name '). asstring;
Strngrd1. Cells[1,i]:=result.asdataset.fieldbyname (' birthday '). asstring;
Strngrd1. Cells[2,i]:=result.asdataset.fieldbyname (' Marital status '). asstring;
Strngrd1. Cells[3,i]:=result.asdataset.fieldbyname (' age '). asstring;
Strngrd1. Cells[4,i]:=result.asdataset.fieldbyname (' Contact ID '). asstring;
i:=i+1;
Result.asDataSet.Next;
End
End
End
Trtcresult code for up
Btn2. Text:= ' Modify impact record number: ' +result.asstring;
Reading data Code
Rtclntmdl1. Startcalls;
Rtclntmdl1. Data.newfunction (' select ');
Rtclntmdl1. Call (RTCRSLT1);
Rtclntmdl1. Post;
Update Data code:
With RTCLNTMDL1. Data.newfunction (' Up ') do
Begin
aswidestring[' a ']:=edt_name. text;//parameter is Chinese, please use aswidestring, otherwise the server received parameters is garbled
asdatetime[' B ']:=edt_cs. Date;
asinteger[' C ']:=strtoint (EDT_NL. Text);
asinteger[' d ']:=strtoint (strngrd1. Cells[4,strngrd1. Selected]);
End
Rtclntmdl1. Call (RTCRSLT2);
End
Android under test not seen garbled
See demo! for other codes.
Http://pan.baidu.com/s/1cea38
Turn: RTC builds Android under three-tier application access server mssql-client