Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Can you help me change the below codes because stringgrid seem excu slowly



Permlink Replies: 0 Threads: [ Previous | Next ]
hots wally

Posts: 53
Registered: 6/14/14
Can you help me change the below codes because stringgrid seem excu slowly
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 13, 2017 11:33 PM
dtpr1:=FormatDatetime('yyyy-mm-dd',DateTimePicker1.Date);
dtpr2:=FormatDatetime('yyyy-mm-dd',DateTimePicker2.Date);
kit:=Trim(Edit1.Text);
u_url:=allurl+'/show16_dquery.asp?zh='+fctuser+'&dtpr1='+dtpr1+'&dtpr2='+dtpr2+'&show=4&kit='+kit+'&t='+Form1.RandomValue(13);
resData := TStringStream.Create('',TEncoding.GetEncoding(65001));
reqData:=Tstringlist.Create;
try
Form1.NetHTTPClient1.Post(u_url, reqData, resData);
jsonstr:=resData.DataString.Trim;
finally
resData.Free;
reqData.Free;
end;
jo:=SO(jsonstr);
ja:=jo.A['text'];
i:=ja.Length;

try
sg2.RowCount := sg2.FixedRows + i;
for i := sg2.FixedRows to sg2.RowCount-1 do
begin
jb:=ja.O[i-1];
for j := 0 to 12 do
sg2.Cells[j, i] := jb.S[FieldNames4[j]];
end;
except
end;
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02