Re: Slow import problem



Take a look at "in" statment in Access SQL help.
"Ingo" <ir2000@xxxxxx> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
news:44964f9a$1@xxxxxxxxxxxxxxxxxxxxxxxxx

(reposted from groups.google.com to http://newsgroups.borland.com/)

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


Riki Wiki schrieb:

On 14 Jun 2006 07:35:28 -0700, ir2000@xxxxxx wrote:

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>


.



Relevant Pages

  • Re: Difference between openrowset and opendatasource
    ... According to the documentation, OpenRowSet supports three-part name. ... > Important For each instance of SQL Server 2000, ... > for an OLE DB provider using the SQL Server DisallowAdhocAccess property. ...
    (microsoft.public.sqlserver.programming)
  • Re: Perflib errors in event logs after SP2 installation
    ... the server does seem to be working fine. ... System account is a potential security risk. ... Policy provider runs under the Local System account, ... Microsoft CSS Online Newsgroup Support ...
    (microsoft.public.windows.server.sbs)
  • Random Network Disconnects
    ... network and the only way I can seem to get it back up is to restart the box. ... Testing IpConfig - pinging the Secondary WINS server... ... DNS Host Name: itdspstest01.itd.edited.edited ... Provider Version:2 ...
    (microsoft.public.windows.server.dns)
  • Re: No inbound emails from outside domain
    ... IntelPRO/1000 MT Server Adapter - Packet Scheduler ... Provider Version:2 ... Description: MSAFD NetBIOS ... I don't think reinstalling Exchange will help. ...
    (microsoft.public.windows.server.sbs)
  • Re: MIDAS/Datasnap Alternative
    ... DDCAppservice is an I/O Completion Ports ... efficient way of developing server applications. ... Increasing the client base does not typically require ... component for each logical data provider. ...
    (borland.public.delphi.thirdpartytools.general)