Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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".

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...