Unable to cast object of type System.DBNull to System.String when configuring BizTalk Accelerator for RosettaNet
When creating a new Home organization in Rosettanet Configuration Console, I got the error “Unable to cast object of type System.DBNull to System.String”. I get this error when after filling all the necessary details and when I click apply
But after creating this error, when I tried to create the same Home organization with the same value, I get the error saying “the party is already present” but that was not getting displayed.
To figure out where this data is getting stored, I took a sql profiler traces and found the data is inserted in Bts_Party and bts_party_alias Views. All the data that is required for creation of home party is already present in these table.
I found the SHASHIHOME was present in bts_party table
nID nPartyID nvcName nvcQualifier nvcValue DateModified
0 19 Organization OrganizationName SHASHIHOME 2013-04-22 14:20:03.590
And this party properties are present in the bts_party_alias tables as shown below
I was checking all the data to see if there was any properties inserted as null in the database that was causing this problem, but there was none.
And this view is shared with both the Rosettanet and the EDI party, so I also started checking all the entries in the Bts_party_alias table and found a null entry for one of the rows in this table for the nvcNave column. I fixed the EDI party that had the problem with necessary value and after that I was able to create the home organization in the Rosettanet Configuration console.
Hope this helps.
Happy Biztalking!!
Written by
Shashidharan Krishnan
Reviewed by
Jainath V R
Microsoft India GTSC