ga_gandhi Posted March 25, 2009 Posted March 25, 2009 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". Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.