Article View: borland.public.interbase.sql
Article #10983performance question
From: Sergio Gonzalez
Date: Thu, 02 Jan 2003 21:29
Date: Thu, 02 Jan 2003 21:29
63 lines
2186 bytes
2186 bytes
Hello,
I'm developing a simple purchase order module. The "Search Item" button has
the code that I post below. It is supposed to run in a client/server network
with the client in one country and the server in another, via TCP/IP.
My question: is that the *best-fastest* way to do it?
Note: "Articulos" is a TIBDataSet. I know that a TIBSQL is faster but I can
not connect it to a dbgrid, can I?
Thanks!
Sergio
>>>>>>>>>>>>
procedure TfrmEdtOrdCpa.BitBtn1Click(Sender: TObject);
var
sSQL: string;
begin
with dm.Articulos do begin
Close;
SelectSQL.Clear;
SelectSQL.Add( 'SELECT' );
SelectSQL.Add( 'CODIGO, CODIGO_S_PROV, CODIGO_BARON, DESCRIPCION' );
SelectSQL.Add( 'FROM ARTICULO WHERE' );
case RadioGroup1.ItemIndex of
0: sSQL := 'CODIGO';
1: sSQL := 'CODIGO_S_PROV';
2: sSQL := 'CODIGO_BARON';
3: sSQL := 'DESCRIPCION';
end;
SelectSQL.Add( sSQL + ' STARTING WITH ''' + edtSearchItem.Text + '''' );
Open;
end;
with tfrmFoundItems.Create(Self) do begin
if ShowModal = mrOk then begin
// something...
end;
Free;
end;
end;
Technical Details
Message-ID:
<3e14afef@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!c03.atl99!news.webusenet.com!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 114a0e,2067f5303db1fb36,start X-Google-Attributes: gid114a0e,public X-Google-ArrivalTime: 2003-01-02 13:42:03 PST Reply-To: "Sergio Gonzalez" <shg@sion.com> From: "Sergio Gonzalez" <shg@sion.com> Newsgroups: borland.public.interbase.sql Subject: performance question Date: Thu, 2 Jan 2003 18:29:03 -0300 Lines: 66 Organization: SG X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 200.69.38.163 Message-ID: <3e14afef@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1041543151 200.69.38.163 (2 Jan 2003 13:32:31 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!c03.atl99!news.webusenet.com!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail