Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #3406 > unrolled thread

Copy complete dbf to sql

Started by"Dirk (Belgium)" <dirk.dot.herijgers@pbprojects.dot.be>
First post2012-05-04 08:45 +0000
Last post2012-05-04 15:17 +0000
Articles 4 — 3 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  Copy complete dbf to sql "Dirk (Belgium)" <dirk.dot.herijgers@pbprojects.dot.be> - 2012-05-04 08:45 +0000
    Re: Copy complete dbf to sql Karl Faller <k.faller_withoutthat_@onlinehome.de> - 2012-05-04 12:35 +0200
    Re: Copy complete dbf to sql "Er!k \\/!$$Er" <nospam@nospam.url> - 2012-05-04 13:42 +0200
      Re: Copy complete dbf to sql "Dirk (Belgium)" <dirk.dot.herijgers@pbprojects.dot.be> - 2012-05-04 15:17 +0000

#3406 — Copy complete dbf to sql

From"Dirk (Belgium)" <dirk.dot.herijgers@pbprojects.dot.be>
Date2012-05-04 08:45 +0000
SubjectCopy complete dbf to sql
Message-ID<jo04v3$kuo$1@dont-email.me>
Hi all,

On a daily base, I have to copy all records from dbf to sql.
This is done in a task which runs during the night, but it takes
already 62 minutes (too long).

On this moment, I use the standard VO SQL classes.
First I do a prepare statement INSERT INTO <table> (field1,field2,...)
VALUES (?,?,...)

After this, for each record of the dbf file, I do the
SQLStatement{}:Execute() method with an array of the values.

So, this process takes to long.

My question:

Does someone know how to speed up this process ????

Thanx for any advice,

Dirk (Belgium)

-- 

[toc] | [next] | [standalone]


#3408

FromKarl Faller <k.faller_withoutthat_@onlinehome.de>
Date2012-05-04 12:35 +0200
Message-ID<97c7q7htioqak7q5d37vn73e1c033kgol6@4ax.com>
In reply to#3406
Dirk,
i would try to do this the other way round, use the SQL DB to import
the DBF...

Karl

>Hi all,
>
>On a daily base, I have to copy all records from dbf to sql.
>This is done in a task which runs during the night, but it takes
>already 62 minutes (too long).
>
>On this moment, I use the standard VO SQL classes.
>First I do a prepare statement INSERT INTO <table> (field1,field2,...)
>VALUES (?,?,...)
>
>After this, for each record of the dbf file, I do the
>SQLStatement{}:Execute() method with an array of the values.
>
>So, this process takes to long.
>
>My question:
>
>Does someone know how to speed up this process ????
>
>Thanx for any advice,
>
>Dirk (Belgium)

[toc] | [prev] | [next] | [standalone]


#3409

From"Er!k \\/!$$Er" <nospam@nospam.url>
Date2012-05-04 13:42 +0200
Message-ID<a0htlqFsgeU1@mid.individual.net>
In reply to#3406
Hi Dirk,

Write the values to CSV and do a BULK INSERT on the Sql database.
or have a look here: 
http://stackoverflow.com/questions/883917/import-dbf-files-into-sql-server

hth

Erik



"Dirk (Belgium)"  schreef in bericht news:jo04v3$kuo$1@dont-email.me...

Hi all,

On a daily base, I have to copy all records from dbf to sql.
This is done in a task which runs during the night, but it takes
already 62 minutes (too long).

On this moment, I use the standard VO SQL classes.
First I do a prepare statement INSERT INTO <table> (field1,field2,...)
VALUES (?,?,...)

After this, for each record of the dbf file, I do the
SQLStatement{}:Execute() method with an array of the values.

So, this process takes to long.

My question:

Does someone know how to speed up this process ????

Thanx for any advice,

Dirk (Belgium)

-- 

[toc] | [prev] | [next] | [standalone]


#3423

From"Dirk (Belgium)" <dirk.dot.herijgers@pbprojects.dot.be>
Date2012-05-04 15:17 +0000
Message-ID<jo0ru3$piv$1@dont-email.me>
In reply to#3409
Hi Erik,

Your suggestion with BULK INSERT is the first way I gonna try...
Thanks for this good suggestion.

Dirk

Er!k \/!$$Er wrote:

> Hi Dirk,
> 
> Write the values to CSV and do a BULK INSERT on the Sql database.
> or have a look here:
> http://stackoverflow.com/questions/883917/import-dbf-files-into-sql-se
> rver
> 
> hth
> 
> Erik
> 
> 
> 
> "Dirk (Belgium)"  schreef in bericht
> news:jo04v3$kuo$1@dont-email.me...
> 
> Hi all,
> 
> On a daily base, I have to copy all records from dbf to sql.
> This is done in a task which runs during the night, but it takes
> already 62 minutes (too long).
> 
> On this moment, I use the standard VO SQL classes.
> First I do a prepare statement INSERT INTO <table> (field1,field2,...)
> VALUES (?,?,...)
> 
> After this, for each record of the dbf file, I do the
> SQLStatement{}:Execute() method with an array of the values.
> 
> So, this process takes to long.
> 
> My question:
> 
> Does someone know how to speed up this process ????
> 
> Thanx for any advice,
> 
> Dirk (Belgium)



-- 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web