🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Access 2000 DB Question

#1024
From: John Borchers
Date: Mon, 13 Dec 2004 12:43
88 lines
3987 bytes
Thanks for your information I will try this.

I tried your component and would buy it, but the documentation shows up all in a large italic font and makes it practically unusable.

John

"Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote:
>For Access use TADOTable with TableDirect = true, server-side client cursor.
>Client-side cursor (UpdateBatch too) composes and executes SQL queries to
>make inserts. Call DisableControls()/EnableControls() even if there is no
>controls attached. Executing inserts inside transaction will speed up 2-3
>times.
>
>For fastest speed look at OLEDB Direct (http://www.oledbdirect.com), example
>in "Examples\Tutorial\Step 6 - transaction". You will be able to avoid ADO
>layer and use OLEDB interfaces directly.
>
>//------------------------------------------
>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)
>
>"J Borchers" <jborchers@noemailtome.com> �������/�������� � ��������
>���������: news:41bc7ed6$1@newsgroups.borland.com...
>> Hi all,
>>
>> I have an access 2000 DB. I get horrid performance doing INSERT
>statements.
>> I use the ADOQuery component. I have a table created as such:
>>
>>  Query1->SQL->Add("CREATE TABLE Articles");
>>  Query1->SQL->Add("(ArticlesID COUNTER,");
>>  Query1->SQL->Add("ServerID LONG, GroupsID LONG,");
>>  Query1->SQL->Add("Subject CHAR (100) NOT NULL,");
>>  Query1->SQL->Add("ArticleNumber LONG,");
>>  Query1->SQL->Add("Checksum LONG,");
>>  Query1->SQL->Add("PRIMARY KEY (ArticlesID))");
>>  TrySQL();
>>
>> At first I would add records using the SQL Insert statement adding one
>> record at a time. This took about 50mS per record - way too slow for a
>> 1.8GHz machine with 650 MB ram.
>>
>> Then, I changed the source to do this:
>>
>> ArticlesQuery->Insert();
>> ArticlesQuery->FieldValues["ServerID"]=
>>                        ServersQuery->FieldValues["ServerID"];
>> ArticlesQuery->FieldValues["GroupsID"]=
>>                         GroupListQuery->FieldValues["GroupsID"];
>> ArticlesQuery->FieldValues["Subject"]=Subject;
>> ArticlesQuery->FieldValues["ArticleNumber"]=ArticleNumber;
>> int chk=Recovery1->Checksum(Subject);
>> ArticlesQuery->FieldValues["Checksum"]=chk;
>> ArticlesQuery->Post();
>>
>> Then every 5000 records I do:
>>
>> ArticlesQuery->UpdateBatch(arAll);
>>
>> where ArticlesQuery is:
>>
>> LockType=batchOptimistic;
>>
>> It seems to take the same amount of time total to do either?
>>
>> What is the best way (or proper way) to add a list of records at one time?
>> What is the best local database to use for this. I would expect
>performance
>> that is somewhere close to adding structures to a file not the horrid
>> performance I am getting.
>>
>> Any help appreciated TIA,
>>
>> John Borchers
>>
>>
>>
>>
>>
>>
>>
>
>
Technical Details
Message-ID: <41bd8e8d$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <41bc7ed6$1@newsgroups.borland.com> <41bd47a3$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,52c9d377ef0d87a7
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII
From: "John Borchers" <jborchers@noemail.com>
Sender: "John Borchers" <jborchers@noemail.com>
Reply-To: "John Borchers" <jborchers@noemail.com>
Subject: Re: Access 2000 DB Question
Newsgroups: borland.public.cppbuilder.database.ado
X-User-Info: 63.116.149.114     
References: <41bc7ed6$1@newsgroups.borland.com> <41bd47a3$1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <41bd8e8d$1@newsgroups.borland.com>
Date: 13 Dec 2004 04:43:57 -0800
X-Trace: newsgroups.borland.com 1102941837 207.105.83.66 (13 Dec 2004 04:43:57 -0800)
Lines: 89
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail