I'd suggest to use SqlCeBulkCopy class
] (from codeplex), which provides several options to copy data between databases in a safe way.
How to use it?
1) download and install this nuget packet
2) create new project,
3) create new OleDbConnection
] to load data from Excel into DataTable
] object (using OleDbCommand
] + OleDbDataReader
4) close OleDbConnection (do NOT delete
object, you'll use it in the next step!),
5) create new SqlCeConnection
6) create new
class and use
object as an input parameter,
For further details, please download the documentation