Archive for July, 2010

July 26, 2010

Error: This row already belongs to another table

I came across a situation where i had to loop through one of the DataTable and to import the same data into another datable where the data order is different. I was trying to do it but the data is not getting copied to the new DataTable. What I have found out is that you can’t just add rows from one DataTable to another. Initially the table structure must be Cloned and then the rows has to be imported. Cloning the DataTable clones the structure including all DataTable schemas and constraints.

DataTable newTable = new DataTable("Sorted");
newTable = transactionHistoryTable.Clone();
for (int j = transactionHistoryTable.Rows.Count - 1; j >= 0; j—)
{
newTable.ImportRow(transactionHistoryTable.Rows[j]);
}
_dsResponse.Tables.Add(newTable);

as a summary what i am doing is, initially the data what i have is some data in some order which was populated from AS400 API. I need the same data other way around, bottom to top (For ex: transactionHistoryTable has some data and i need to traverse it back).

Advertisements
July 14, 2010

Failed to connect to the SQL database ‘SSODB’ on SQL Server

When you tried to configure BizTalk after the successful installation, if you prompted for an error like the one mentioned above, Execute the following command in Visual Studio command prompt.

explore to the following folder:

C:\Windows\Microsoft.NET\Framework64\v2.0.50727>

and run the following command :

RegAsm.exe “C:\Program Files\Common Files\Enterprise Single Sign-On\SSOSQL.dll”

Note : As i am using the Windows 2008 R2 Server, i had to explore to the Framework64 folder.

image