ImportRow from one dataSet to table of another dataset

ga_gandhi

New member
Joined
Mar 25, 2009
Messages
1
I am trying to importRow from one datatable to another datatable.
Code is as below
if (!pTargetRelease.kPIs.mainDS.Tables["KPIs"].Rows.Contains(dr["KPI"]))
{
// Find the pSourceRelease KPI row and add it
DataRow newRow = pSourceRelease.kPIs.GetKpiRow(dr["KPI"].ToString());
if (newRow != null)
pTargetRelease.kPIs.mainDS.Tables["KPIs"].ImportRow(newRow);
}

pTargetRelease.AcceptChanges();

If i debug and see then it imports the row from sourceRelease to TargetRelease but when i do not debug and directly run the application, it does not import the rows.

And one more thing, It is not working in development enviornment only. Development enviornment is WindowsXP. This works in test enviornment and it is on Windows 2003 server.

No idea what is happening. Can someone please help me.
And i have also checked the rowstate also. In both dataset, rowstate for each row is "Unchanged".
 
Back
Top