DbNetCopy provides a quick and easy way to copy information between different types of databases. DbNetCopy includes a GUI application that is ideal for one off transfer of data and also an API .Net assembly that allows custom solutions to be created.
... // Source MS Access connection string string SourceStr = @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\uploadedfiles\transactions.mdb;" // Target MS Sql Server connection string string TargetStr = @"Server=DbServer;database=Sales;Trusted_Connection=true;" // Create source connection DbNetData SourceConn = new DbNetData(SourceStr); // Create target connection DbNetData TargetConn = new DbNetData(TargetStr); using (DbNetCopy DNC = new DbNetCopy(SourceConn, TargetConn)) { // Copy schema and data DNC.CopyOption = CopyOptions.SchemaAndData; // Use default schema in target database DNC.SchemaOption = SchemaOptions.Drop; // Drop the table first in the target database DNC.DropTargetTable = true; // Copy the entire database DNC.CopyDatabase(); } ...