My below code is taking 15 minutes or more to run and I need to find a more efficient way. Any ideas please?? Thanks for any helpICursor pCursor;
IRow pRow2;
ICursor pTableCursor;
pTableCursor = pTable.Search(null, true); //pTable is a table inside of a local personal geodatabase
pRow2 = pTableCursor.NextRow();
IRowBuffer pRowBuff;
pRowBuff = pNewTable.CreateRowBuffer(); //pNewTable is a table I just created inside a local File Geodatabase
pCursor = pNewTable.Insert(true);
do
{
//populate the row with values
pRowBuff.set_Value((Int32)l_FCWell_ID, pRow2.get_Value((Int32)l_Well_ID));
pRowBuff.set_Value((Int32)l_FCSidetrack_Number, pRow2.get_Value((Int32)l_Sidetrack_Number));
pRowBuff.set_Value((Int32)l_FCAlternate_ID, pRow2.get_Value((Int32)l_Alternate_ID));
pRowBuff.set_Value((Int32)l_FCMeasured_Depth, pRow2.get_Value((Int32)l_Measured_Depth));
pRowBuff.set_Value((Int32)l_FCInclination, pRow2.get_Value((Int32)l_Inclination));
pRowBuff.set_Value((Int32)l_FCAzimuth, pRow2.get_Value((Int32)l_Azimuth));
pRowBuff.set_Value((Int32)l_FCE_W, pRow2.get_Value((Int32)l_E_W));
pRowBuff.set_Value((Int32)l_FCN_S, pRow2.get_Value((Int32)l_N_S));
pRowBuff.set_Value((Int32)l_FCTVD, pRow2.get_Value((Int32)l_TVD));
pRowBuff.set_Value((Int32)l_FCState_Plane_Easting, pRow2.get_Value((Int32)l_State_Plane_Easting));
pRowBuff.set_Value((Int32)l_FCState_Plane_Northing, pRow2.get_Value((Int32)l_State_Plane_Northing));
pRowBuff.set_Value((Int32)l_FCSub_Sea_TVD, pRow2.get_Value((Int32)l_Sub_Sea_TVD));
pCursor.InsertRow(pRowBuff);
pRow2 = pTableCursor.NextRow();
} while (pRow2 != null);