T
Troy McLure
I have used the code below to copy data from one Access file to another
Access file, and it's seems to be pretty fast. When the source tables
are in Oracle and using an OracleConnection as source, my insertstring
won't work anymore. Will I have to start filling datasets, traverse the
rows and copy each field in for-loops? Won't that be terribly slow? Is
there a faster way?
//Destination Access file exists and has the same tablenames and
fieldnames as the source, so:
OleDbConnection conSrc =
new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;"+
"data source=" + @"c:\source.mdb" );
conSrc.Open();
string insertstring = @"INSERT INTO tablename IN "c:\destination.mdb"
SELECT * FROM tablename";
OleDbCommand cmd = new OleDbCommand(insertString, conSrc);
cmd.ExecuteNonQuery();
Access file, and it's seems to be pretty fast. When the source tables
are in Oracle and using an OracleConnection as source, my insertstring
won't work anymore. Will I have to start filling datasets, traverse the
rows and copy each field in for-loops? Won't that be terribly slow? Is
there a faster way?
//Destination Access file exists and has the same tablenames and
fieldnames as the source, so:
OleDbConnection conSrc =
new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;"+
"data source=" + @"c:\source.mdb" );
conSrc.Open();
string insertstring = @"INSERT INTO tablename IN "c:\destination.mdb"
SELECT * FROM tablename";
OleDbCommand cmd = new OleDbCommand(insertString, conSrc);
cmd.ExecuteNonQuery();