RE: Passing parameters to SPs (SQL Adapter)

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



(1) That would just be to easy and logical! I don't know why Microsoft
didn't make the obvious easy, but they didn't.

Think of a message as an object. You cannot set variables in an object
until you instantiate the object. Constructing is both instantiation, and
setting up the initial tree structure, i.e. the basic elements and attributes
required.

For example, you could construct an message with a root element (x) and a
sub-element (y). But in your schema, you also have sub-elemnet (z). The
software would allow you to construct this (it does not validate the data
against the schema).
Then you could even say msg.z = "test" (it would compile), but you will then
get an XLANG run-time error complaining about no such element.

(2) Does your orch. receive any message before you call SQL? If so, map
that message since any message you receive is already constructed. Now, the
map doens't even need any lines attaching the left side to the right side.
You could use string concatenate to initialize various elements on the right
side.

The are other posts that describe this, but the other two ways to constuct
are:
1) Call a .NET program - what a pain
2) Use a variable of type System.Xml.XmlDocument, do something like
myXmlDoc.Load ("<root><x/><y/></root>").
3) Set your message:
myMsg = myXmlDoc

Someday, I'm going to create a .NET program that constructs and initializes
an empty document according to the schema spec. IMHO Microsoft should have
provided this feature.

Neal Walters
http://Biztalk-Training.com


"BizTalk Benjamin" wrote:

> Neal,
> Yes, I am getting a "message not constructed" error. Issues are
>
> (1) I dont understand why I need a map when i have two variables with the
> data. Shouldnt i be able to assign values into the parts of the message
> directly?
>
> (2)I tried creating a dummy message with the data so i could then create a
> map between the dummy and the stored proc message. While constructing that
> dummy message i got the same errors (unconstructed message). Bit of a vicious
> cycle actually. I am not able to create any message at all.
>
> Anyway, for now I just bit the bullet and created a separate DB helper and
> that works fine. Guess I'll fight this battle again when I have some spare
> time
>
> Thanks for replying.
>
> "Neal Walters" wrote:
>
> > Are you getting error "message not constructed"? All messages, whether they
> > go to SQL or a flat file must be constructed first. There are many posts
> > here on how to construct - the easiest is to create a Biztalk Map. Use the
> > construct shape, add the transform shape. The map should map to your sql
> > Request message.
> >
> > Neal Walters
> > http://Biztalk-Training.com - Yes, I have an entire intermediate
> > video on the SQL adapter!
.



Relevant Pages

  • RE: Full Security - mapping shared printer...
    ... Microsoft Global Technical Support Center ... Full Security - mapping shared printer... ... | to a terminal server thing. ... | map the same printer without issue. ...
    (microsoft.public.windows.terminal_services)
  • RE: Map generated XSLT
    ... Microsoft Online Community Support ... I have always heard that you can use the generated XSLT from a map in POCO I actually do it all the time for xml -> xml translations using XSLTCompiledTransform. ...
    (microsoft.public.biztalk.general)
  • Re: REMOVE KB885250 !!!
    ... If you share a map directly then there is no problem with that map either. ... Sure I'm not gonna pay for it. ... >>I CALLED MICROSOFT ABOUT THE SHARING PROBLEMS AND THEY ...
    (microsoft.public.windowsxp.network_web)
  • Re: Copy a Google map to Word Document
    ... MVP Microsoft [Publisher] ... Tech Editor for "Microsoft Publisher 2007 For Dummies" ... space to get a bigger map area. ...
    (microsoft.public.word.newusers)
  • Re: Copy a Google map to Word Document
    ... MVP Microsoft [Publisher] ... Tech Editor for "Microsoft Publisher 2007 For Dummies" ... Sometimes this gives you a printable page, which provides a better screen shot, but an even better solution in this case, if you are using a screen capture application such as SnagIt, is to print directly to the SnagIt printer, which captures the screen at whatever resolution you specify. ... space to get a bigger map area. ...
    (microsoft.public.word.newusers)