Hi Guys,

Does anybody know how to make a bulk copy of a table from one database to 
another using Fb Net provider?

I am trying to achieve this goal using something like this:

FbDataAdapter sourceDA = new FbDataAdapter("SELECT * FROM TEST_TABLE", 
fbSourceConn);
DataSet ds = new DataSet();
sourceDA.Fill(ds, "TEST_TABLE");
FbDataAdapter targetDA = new FbDataAdapter("SELECT * FROM TEST_TABLE", 
fbTargetConn);
FbCommandBuilder fbCb = new FbCommandBuilder(targetDA);
targetDA.InsertCommand = fbCb.GetInsertCommand();
foreach(DataRow dr in ds.Tables["TEST_TABLE"].Rows)
{
    /// Change the state of the row
    dr.SetAdded();
}
targetDA.Update(ds, "TEST_TABLE");

The problem with this approach is that FbDataAdapter.Update() is too slow. 
It takes almost 1 hour to copy aprox 500.000 rows.

Is there a faster way to do this? or am I missing something?

Thanks in advance
Eduardo 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to