Monday, 09 April 2007

Hi

I have just written a blog post about using the SQL Adapter Wizard and during my tests for this post, I found the cause of an error that I saw someone in the newsgroups ask about. So I will just post the answer here.

I got these errors when compiling my project, in which I have used the SQL Adapter Wizard twice to create a schema for me:

Error 1 illegal name-hiding: 'Orchestration_1' hides 'SQLAdapter.Orchestration_1' on line 101 C:\Projects\BTS 2006\BlogEntries\SQLAdapter\BizTalk Orchestration_1.odx 102 23 

Error 2 symbol 'Orchestration_1' is already defined; the first definition is in file C:\Projects\BTS 2006\BlogEntries\SQLAdapter\BizTalk Orchestration.odx on line 101 C:\Projects\BTS 2006\BlogEntries\SQLAdapter\BizTalk Orchestration_1.odx 102 23

It turns out, that when you use the SQL Adapter Wizard to automatically create schemas for you, then an orchestration is also created for you. Yes, I knew that, you say? Well, so did I :-) What I didn't know was that the Wizard is clever enough to give the two orchestrations different filenames, but stupid enough to give them both the .NET type name "Orchestration_1". So when compiling the project, you have two orchestrations with the same fully qualified typename, which off course will fail.

See this screenshot:

As you can see at the lower right vorner of the picture, the "BizTalk Orchestration_1.odx" has "Orchestration_1" as its typename. Well, "BizTalk Orchestration.odx" has the same.

"So I just change one of them, no problem", you say? Well, there is another problem... If you look at the port types and multi-part message types in each orchestration, they are also given the same names. So changing the typename of one of the orchestrations removes the compilation error, but it will just give you the next set of errors, as more things are given the same name, and therefor more illegal name-hiding is taking place. Se the post here about what you can do to rename things.

I hope this helps someone.

--
eliasen

Monday, 09 April 2007 23:40:56 (Romance Daylight Time, UTC+02:00)  #    Comments [1]  | 

Theme design by Jelle Druyts