efficiently copy info from one database to another

  • Thread starter Thread starter PaulS
  • Start date Start date
P

PaulS

I have 2 sql server ce databases on my PocketPC.
What would be the most efficient way to transfer some of the records
from one database to another if the table structure is the same in
both databases?
I'm using vb.net and the option to create insert statement
by iterating through all fields seems cumbersome because
the table has more than 30 fields.
 
Paul,

Have you considered doing an RDA Push from one SQL CE database
to an instance of SQL Server on your desktop and then doing an RDA
pull from the desktop to your second SQL CE database?

-Darren
 
There is a difference between the efficent copy as in quickly executing and
efficient as in quick to implement. IMO the former is more important, since
the latter can be automated to a certain degree by writing a function that
would walk the list of fields and generate an appropriate Insert
SqlCeCommand. The fastest way to do this on the device is to use prepared
command with parameters. Build a command, prepare it and then loop through a
data reader and set parameter values, then execute the command
 
Alex,
thank you for your advise.

At this moment my objective is to write as less code as possible because
it is a test program.

I'm trying to find a fast substitute for this
embedded Vb line:

rs.AddNew arrayOfFields, arrayOfValues
 
Back
Top