BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Slow import problem

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO)
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Wed Jun 14, 2006 7:35 pm    Post subject: Slow import problem Reply with quote



Hello everybody!

I have to import text files (csv) of different structure (various
delimiters and text qualifiers) containing customer data. All data
needs to be inserted in an existing table. That table has 49 columns so
I have created a tool to assign the columns from the file to the
table's columns.

e.g.: filecolumn1 -> tablecolumn23; filecolumn2 -> tablecolumn5

Currently I am using a TADOConnection with
Provider=Microsoft.Jet.OLEDB.4.0 and a TADODataset to connect to the
file. Then a "while not eof"-loop steps through the Dataset and builds
an INSERT-SQL-Statement like "INSERT INTO mytable (tablecolumn23,
tablecolumn5) VALUES ('hello', 'world')" where 'hello' would be a a
value of filecolumn1 and 'world' value of filecolumn2

For 12000 records this takes like 25 minutes what is far too slow...

I searched for other importing methods and found BULK INSERT and
OPENROWSET.
For BULK INSERT I didnt find a way to assign my columns and OPENROWSET
throws an exception (Ad hoc access to OLE DB provider
'Microsoft.Jet.OLEDB.4.0' has been denied. You must access this
provider through a linked server.) that I havent found a way to work
around without modifying server config oder registry which is no
option.
Other components than Delphi's ADO are also no option.

I hope I could explain my problem in a comprehensible way.
Any hints, solutions or questions are very welcome!

thanks in advance
Ingo
Back to top
Riki Wiki
Guest





PostPosted: Fri Jun 16, 2006 11:23 pm    Post subject: Re: Slow import problem Reply with quote



On 14 Jun 2006 07:35:28 -0700, ir2000 (AT) web (DOT) de wrote:

Quote:
Any hints, solutions or questions are very welcome!

Hoi Ingo

You need to repost your message on the Borland news server to make
everybody see it and possibly answer your message.

How to post to Delphi newsgroups:
<http://delphi.wikia.com/wiki/Delphi_Newsgroups>
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.