Z
zyx1122
Unregistered / Unconfirmed
GUEST, unregistred user!
Whatdo
es delphido
when running "select * from ..." in server side ?
And whatdo
es delphido
in client side?
Whether when running in client side, delphi will run it in server side
and get all data from database and send the data to client side.
I mean every time running in client side, delphi will run it in server side.
eg:
select * from orders where CustNo = '001'
Now run it in client side, and delphi will run it in server side, is it?
And then
run
select * from orders where CustNo = '002'
Whether delphi runs it in server side again or
delhpi run only one time "select from orders' without "where CustNo = '001''
and gets all data to client side. So when client side runs sql it just gets
data from its own memory.
why I ask this because I write code like follow, I want to know whether delphi
will run very time in server side when I change CommandText.
/////////////////////// AfterScroll //////////////////////
procedure TdmMDC.cdsMasterAfterScroll(DataSet: TDataSet);
var
strMasterField : string;
begin
cdsDetail.Close;
strMasterField := cdsMaster.FieldByName('CustNo').AsString;
cdsDetail.CommandText := 'select * from orders where CustNo = "'
+ strMasterField + '"';
cdsDetail.Open;
end;
es delphido
when running "select * from ..." in server side ?
And whatdo
es delphido
in client side?
Whether when running in client side, delphi will run it in server side
and get all data from database and send the data to client side.
I mean every time running in client side, delphi will run it in server side.
eg:
select * from orders where CustNo = '001'
Now run it in client side, and delphi will run it in server side, is it?
And then
run
select * from orders where CustNo = '002'
Whether delphi runs it in server side again or
delhpi run only one time "select from orders' without "where CustNo = '001''
and gets all data to client side. So when client side runs sql it just gets
data from its own memory.
why I ask this because I write code like follow, I want to know whether delphi
will run very time in server side when I change CommandText.
/////////////////////// AfterScroll //////////////////////
procedure TdmMDC.cdsMasterAfterScroll(DataSet: TDataSet);
var
strMasterField : string;
begin
cdsDetail.Close;
strMasterField := cdsMaster.FieldByName('CustNo').AsString;
cdsDetail.CommandText := 'select * from orders where CustNo = "'
+ strMasterField + '"';
cdsDetail.Open;
end;