Different Sql Commands depending on an XML element
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server General > Different Sql Commands depending on an XML element




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Different Sql Commands depending on an XML element  
Luis Esteban Valencia


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-14-05 10:51 PM

Hello My  XML has
<ns0:BusCard_Request xmlns:ns0="http://BTSDG_SQL">
<ns0:sync>
<ns0:after>
<ns0:BusinessCards NameOnCard="Sam Watkins"
TitleOnCard="President" Quantity="1000" />
</ns0:after>
</ns0:sync>
</ns0:BusCard_Request>


And its working and inserting rows on the table

What about if I want that when quantity is > 100000 it update a row on the
table named status="Pending for Review" for example.

What do I need to do?

Thanks







[ Post a follow-up to this message ]



    RE: Different Sql Commands depending on an XML element  
Doug Girard [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-27-06 12:26 PM

Luis,

I'm not sure how you're invoking this call to the SQL adapter to begin
with, but you can use conditional logic in several places to make this
call.  If you are implementing a pure messaging scenario or direct binding
to the message box, then promoting the quantity property into the message
context and creating a specific send port filtering on qty > 100000 would
work.  You could alternatively use If ... Then logic if you are calling the
send port from orchestration.

HTH,
Doug Girard [MSFT]

Note: This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
>From: "Luis Esteban Valencia" <levalencia@avansoft.com>
>Subject: Different Sql Commands depending on an XML element
>Date: Thu, 14 Jul 2005 09:29:27 -0500
>Lines: 21
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.3790.0
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Message-ID: <#V2KP#HiFHA.3288@TK2MSFTNGP09.phx.gbl>
>Newsgroups: microsoft.public.biztalk.general
>NNTP-Posting-Host: 200.124.170.10
>Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
>Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.biztalk.general:15578
>X-Tomcat-NG: microsoft.public.biztalk.general
>
>Hello My  XML has
><ns0:BusCard_Request xmlns:ns0="http://BTSDG_SQL">
>  <ns0:sync>
>    <ns0:after>
>      <ns0:BusinessCards NameOnCard="Sam Watkins"
>        TitleOnCard="President" Quantity="1000" />
>    </ns0:after>
>  </ns0:sync>
></ns0:BusCard_Request>
>
>
>And its working and inserting rows on the table
>
>What about if I want that when quantity is > 100000 it update a row on the
>table named status="Pending for Review" for example.
>
>What do I need to do?
>
>Thanks
>
>
>






[ Post a follow-up to this message ]



    Re: Different Sql Commands depending on an XML element  
Greg Forsythe


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-27-06 12:26 PM

You could also do this in a map.
use the Logical Greater Than and Value Mapping functoid to map a fixed
string into the status attribute.
Assuming status is a nullable column in the same table - add an optional
attribute status to the BusinessCards node.

<ns0:BusCard_Request xmlns:ns0="http://BTSDG_SQL">
<ns0:sync>
<ns0:after>
<ns0:BusinessCards NameOnCard="Sam Watkins"
TitleOnCard="President" Quantity="100000" status="Pending For
Review" />
</ns0:after>
</ns0:sync>
</ns0:BusCard_Request>

Greg

"Doug Girard [MSFT]" <dogirard@online.microsoft.com> wrote in message
news:RaB3QZKaGHA.932@TK2MSFTNGXA01.phx.gbl...
> Luis,
>
> I'm not sure how you're invoking this call to the SQL adapter to begin
> with, but you can use conditional logic in several places to make this
> call.  If you are implementing a pure messaging scenario or direct binding
> to the message box, then promoting the quantity property into the message
> context and creating a specific send port filtering on qty > 100000 would
> work.  You could alternatively use If ... Then logic if you are calling
> the
> send port from orchestration.
>
> HTH,
> Doug Girard [MSFT]
>
> Note: This posting is provided "AS IS" with no warranties, and confers no
> rights.
> -------------------- 
>







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 06:24 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register