public string RestoreData_to_Database(string tableName, DataSet XmlFileDS) { try { DataTable dt = new DataTable(); dt = XmlFileDS.Tables[0]; SqlBulkCopy bulkcopy = new SqlBulkCopy(connect.ConnectionString, SqlBulkCopyOptions.KeepIdentity ); bulkcopy.DestinationTableName = tableName; bulkcopy.WriteToServer(dt); return "true"; } catch(Exception ex) { return ex.Message; } finally { CloseConnection(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)