RE: Update/Insert into SQL

From: Neal Walters (NealWalters_at_discussions.microsoft.com)
Date: 01/26/05


Date: Wed, 26 Jan 2005 14:53:03 -0800

Just write an SQL Stored Procedure to handle the problem. It could check to
see if row exists, update if it exists, or add it if it doesn't exist.

When you run the SQL adapter from Visual Studio, it will build a schema
called something like SqlService.xsd. You can rename it to something more
meaningful. You can then map your data to this schema. The SqlAdapter also
build a "dummy" orchestration which you can delete.

All the parms of the stored procedure will be exposed as attributes in the
schema. If the stored procedure returns a table, the table and elements will
also be in the schema. The SQL adapter will ask for a Request and Response
root element name. The Request root element name will wrap the stored
procedure parms, and the Response root element name will wrap any returned
data.

I don't know if you are using orchestration or not, but you would create a
Request/Response port (not sure if a Send-Only port would work). I still
haven't figured out how to get the return-code from a Stored Proc back into
Biztalk.

Neal Walters
http://Biztalk-Training.com



Relevant Pages

  • Re: Using stored procedure properly
    ... You shouldn't put the stored procedure name for Request Root Element. ... When you are generating the schema using the wizard, the first screen asks for NameSpace and Request Root element name. ...
    (microsoft.public.biztalk.general)
  • RE: Problem using SQL Transport Schema Generation Wizard
    ... xmldata" insdie the stored procedure. ... procedure in the SQL Schema wizard. ...
    (microsoft.public.biztalk.general)
  • Re: Views vs Stored Procedures, whats the difference?
    ... I hope you are not suggesting you embed SQL queries into the application? ... A stored procedure logic will be exactly as fast as the algorithm you ... I understant that SQL Server supports hints. ... implementations (nestedloop, merge, hash, ..) on decent sized tables, then ...
    (comp.databases.ms-sqlserver)
  • Re: Problem using SQL Transport Schema Generation Wizard
    ... >> schema from a SQL stored procedure. ... In the wizard, when I press next in the stored ... Your stored procedure is being executed once upon creating the SQL schema ...
    (microsoft.public.biztalk.general)
  • Re: Stored Procedures - Patterns and Practices
    ... >published the reasoning behind its opinions. ... I disagree that the debate in SQL Server related discussion forums ... If the natural key is long or spans too many ... I want to call a stored procedure that adds a customer ...
    (microsoft.public.sqlserver.programming)