Massive write in sqlce

  • Thread starter Thread starter Miliuccio
  • Start date Start date
M

Miliuccio

I use this loop to read from 2000SQL and write in a clean table on my SQLCE

'Inizio Transazione Reparti'
rcmd.CommandText = "SELECT * FROM ARCHIVIOSQL2000"
rrdr = rcmd.ExecuteReader()
While rrdr.Read()
cmd.CommandText = "INSERT INTO ARCHIVIOCE (TABELLA) VALUES
(rrdr("NOMETABELLA2000")"
rdr = cmd.ExecuteReader()
End While

Is there a metod to do a massive write on sqlCE from my vector? without the
loop that use 3 minutes to write any row?
 
yes, you should be using a parameterized statement for your
insert into SQL CE and be sure to Prepare the statement and then
reuse it with each successive insert.

It might be faster for you to use RDA to pull your data from SQL Server 2000
to SQL CE. (or just export your data to CSV, copy it to your device, and
load the SQL CE database there).

--
Darren Shaffer
..NET Compact Framework MVP
Principal Architect
Connected Innovation
www.connectedinnovation.com
 
the long time for my operation is in the loop to write.

coping csv on my pocket and then write, i think it don't resolve my problem.

how to use RDA?
 
to use rda i must manage an iis server and replicate a sql2000db
i'd like to access directly to main db without any other configuration
 
Back
Top