/// <summary> /// Copy the table contents of a table in the current database into a table with the same name in an SQLite DB /// </summary> /// <param name="table">Metadata of the table to copy</param> /// <param name="target">SQLite backend that will be used to copy the contents of the table</param> public override void DumpTableContents(TableMetaData table, IDBBackEnd target) { try { using (OleDbConnection connector = new OleDbConnection(connectionString)) { connector.Open(); using (OleDbCommand cmd = connector.CreateCommand()) { cmd.CommandText = String.Format("SELECT * FROM [{0}]", table.tableName); using (OleDbDataReader db = cmd.ExecuteReader()) { target.DumpTable(table, db); } } connector.Close(); } } catch (OleDbException ex) { Console.Out.WriteLine("MSAccess Exception dumping table {0} : {1}", table.tableName, ex.Message); } }
/// <summary> /// /// </summary> /// <param name="table"></param> /// <param name="target"></param> public override void DumpTableContents(TableMetaData table, IDBBackEnd target) { throw new NotImplementedException(); }
/// <summary> /// Copy the table contents of a table in the current database into a table with the same name in another database /// </summary> /// <param name="table">Metadata of the table to copy</param> /// <param name="target">IDBBackend that will be used to copy the contents of the table</param> public abstract void DumpTableContents(TableMetaData table, IDBBackEnd target);