🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #1792

Re: Speed with ADO

#1792
From: Viatcheslav V. Vassiliev
Date: Wed, 28 Jan 2004 11:45
46 lines
2552 bytes
With VB default is server-side cursor, with VCL - client-side, so all
records are fetched into in-memory cache. Try to use server-side cursor and
call DisableControls()\EnableControls() even if no controls are attached.

//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)

"avix" <avix@avix.com> �������/�������� � �������� ���������:
news:bv86qd$p6060$1@ID-202260.news.uni-berlin.de...
> Hello,
>
> I'm writting several DB access routines with ADO and i started to write
them
> in Visual Basic, they worked fine. Now i'm 'transalting' those routines to
> Builder and i'm very surprised because they work slower than in VB. What
in
> vb takes aprox. 500 ms in BCB takes almost 800 ms.
>
> I'm creating TADOCommand and TADODataSet inside the code (with new, not
> using controls) . The most important time cost is when the command is
> executed and the recordset is created (the sentences between the '>>>>>>'
> marks):
>
> TADOCommand *ADOcommand = new TADOCommand(Application);
> ADOcommand->Connection = ADOconnection;
> ADOcommand->CommandType = cmdText;
> ADOcommand->CommandText = txtSQL;
>
> >>>>
> TADODataSet *ADOrset = new TADODataSet(Application);
> ADOrset->Recordset = ADOcommand->Execute();
> >>>>
>
> Do you know any tricks for speeding up my code?
> Am i doing somethig wrong?
>
> Thank you in advance.
>
> Avix
>
>
Technical Details
Message-ID: <4017a0bf$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <bv86qd$p6060$1@ID-202260.news.uni-berlin.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10698b,b8117718debae563
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2004-01-28 03:55:42 PST
From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <bv86qd$p6060$1@ID-202260.news.uni-berlin.de>
Subject: Re: Speed with ADO
Date: Wed, 28 Jan 2004 14:45:01 +0300
Lines: 48
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 213.234.218.42
Message-ID: <4017a0bf$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1075290303 213.234.218.42 (28 Jan 2004 03:45:03 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail