🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Speed with ADO

#1793
From: avix
Date: Wed, 28 Jan 2004 12:23
69 lines
3160 bytes
Thank you for your quick help.

I have added those calls you said:
    ADOrset->CursorLocation = clUseServer;
    ADOrset->DisableControls();
before the call to ADOcommand->Execute();

but i have not noticed any changes in the timings. Am i doing those calls
correctly? should i change the CursorLocation property after the Execute()
command ?

thank you.

Avix.


"Viatcheslav V. Vassiliev" <support@oledbdirect.com> escribi� en el mensaje
news:4017a0bf$1@newsgroups.borland.com...
> 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: <bv89lq$pemhq$1@ID-202260.news.uni-berlin.de>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!246.red-80-38-55.pooles.rima-tde.NET!not-for-mail
References: <bv86qd$p6060$1@ID-202260.news.uni-berlin.de> <4017a0bf$1@newsgroups.borland.com>

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 04:24:28 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!246.red-80-38-55.pooles.rima-tde.NET!not-for-mail
From: "avix" <avix@avix.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Re: Speed with ADO
Date: Wed, 28 Jan 2004 13:23:51 +0100
Lines: 71
Message-ID: <bv89lq$pemhq$1@ID-202260.news.uni-berlin.de>
References: <bv86qd$p6060$1@ID-202260.news.uni-berlin.de> <4017a0bf$1@newsgroups.borland.com>
NNTP-Posting-Host: 246.red-80-38-55.pooles.rima-tde.net (80.38.55.246)
X-Trace: news.uni-berlin.de 1075292666 26696250 80.38.55.246 ([202260])
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