Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/erikej/sqlcebulkcopy
.NET Library for loading data fast (doing bulk inserts) into a SQL Server Compact database file. Attempts to mimic the SqlClient SqlBulkCopy API.
https://github.com/erikej/sqlcebulkcopy
bulk-inserts sql-server-compact
Last synced: about 1 month ago
JSON representation
.NET Library for loading data fast (doing bulk inserts) into a SQL Server Compact database file. Attempts to mimic the SqlClient SqlBulkCopy API.
- Host: GitHub
- URL: https://github.com/erikej/sqlcebulkcopy
- Owner: ErikEJ
- License: mit
- Created: 2017-03-31T10:34:52.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-06-22T05:48:38.000Z (over 3 years ago)
- Last Synced: 2024-11-01T13:42:07.449Z (about 2 months ago)
- Topics: bulk-inserts, sql-server-compact
- Language: C#
- Size: 240 KB
- Stars: 33
- Watchers: 7
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SqlCeBulkCopy
.NET Library for loading data fast (doing bulk inserts) into a SQL Server Compact database file. Attempts to mimic the SqlClient SqlBulkCopy API.**How fast is it?**
Some timings from testing - load 2 column table with no constraints/indexes:
1.000.000 rows: 6 seconds = 166.666 rows/second
5.000.000 rows: 28 seconds = 178.000 rows/second
**How to get it**
For use with SQL Server Compact 4.0, simply install the [NuGet package](http://nuget.org/packages/ErikEJ.SqlCeBulkCopy)
The library also works with SQL Server Compact 3.5 and .NET Compact Framework [see Releases](https://github.com/ErikEJ/SqlCeBulkCopy/releases)
**How to use it**
Sample usage of the API - the WriteToServer method also accepts a DataTable, an IEnumerable or an IEnumerable
using ErikEJ.SqlCe;
private static void DoBulkCopy(bool keepNulls, IDataReader reader)
{
SqlCeBulkCopyOptions options = new SqlCeBulkCopyOptions();
if (keepNulls)
{
options = options |= SqlCeBulkCopyOptions.KeepNulls;
}
using (SqlCeBulkCopy bc = new SqlCeBulkCopy(connectionString, options))
{
bc.DestinationTableName = "tblDoctor";
bc.WriteToServer(reader);
}
}[Online documentation](https://erikej.github.io/SqlCeBulkCopy/)
[Offline documentation](https://github.com/ErikEJ/SqlCeBulkCopy/blob/master/doc/SqlCeBulkCopyDoc.1.1.zip)