Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 15th, 2007, 11:16 AM
Authorized User
 
Join Date: Aug 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using sql request/response adapter with Biztalk

Hi,

I am trying to test a stored procedure in my sql adapter with Biztalk 2004 that inserts records and then returns a xml page showing what records were inserted. I first tried with just inserting the records and that worked fine, but when I add the select statement and changed the sql adapter to a request/response I got the error:

Streaming not supported over multiple column result

Though when I test it in Query Analyser it works fine?

All I really want is some response to say that the procedure was successful, if it isn't possible the way I have tried can someone then suggest how I can do this? I would appreciate any help!!!

Thanks, Shazz

here is my stored procedure:


CREATE PROCEDURE sp_UpdateTestPricelist

(
 --UpdateArticle table
 @SupplierArticleGUID uniqueidentifier='{00000000-0000-0000-0000-000000000000}',
 @SupplierGUID uniqueidentifier='{00000000-0000-0000-0000-000000000000}',
 @SupplierArticleDescription nvarchar(150)='sugar',
 @SupplierArticleNumber nvarchar(50)='4711',
 @EAN nvarchar(50)='',
 @VatKeyValue int=16,
 --UpdateArticlePrice table
 @SupplierArticlePriceGUID uniqueidentifier='{00000000-0000-0000-0000-000000000000}',
 --@SupplierArticleGUID uniqueidentifier,
 @ValidFrom datetime='',
 @ValidTo datetime='',
 @UnitOfMeasurement nvarchar(50)='kg',
 @LotType uniqueidentifier='{00000000-0000-0000-0000-000000000000}',
 @LotSize decimal(6,2)=1,
 @GrossWeight decimal(6,2)=0.0,
 @NetWeight decimal(6,2)=0.0,
 @UnitPrimeCost decimal(6,2)=0.0,
 @LotPrimeCost decimal(6,2)=0.0,
 @Currency nvarchar(50)='EUR'
)
AS

 DECLARE @ImportDate int

 SET @ImportDate = year(getdate()) * 10000 + month(getdate()) * 100 + day(getdate())


 DELETE FROM UpdateArticlePrice WHERE SupplierArticleGUID IN (SELECT SupplierArticleGUID FROM UpdateArticle WHERE ImportDate <> @ImportDate AND SupplierGUID = @SupplierGUID)
 DELETE FROM UpdateArticle WHERE ImportDate <> @ImportDate AND SupplierGUID = @SupplierGUID

 BEGIN
  SET @SupplierArticleGUID = newid()
  SET @SupplierArticlePriceGUID = newid()
  INSERT INTO UpdateArticle
  (
   SupplierArticleGUID,
   SupplierGUID,
   SupplierArticleDescription,
   SupplierArticleNumber,
   EAN,
   VatKeyValue,
   ImportDate
  )
  VALUES
  (
   @SupplierArticleGUID,
   @SupplierGUID,
   @SupplierArticleDescription,
   @SupplierArticleNumber,
   @EAN,
   @VatKeyValue,
   @ImportDate
  )

  insert into UpdateArticlePrice
  (
   SupplierArticlePriceGUID,
   SupplierArticleGUID,
   ValidFrom,
   ValidTo,
   UnitOfMeasurement,
   LotType,
   LotSize,
   GrossWeight,
   NetWeight,
   UnitPrimeCost,
   LotPrimeCost,
   Currency
  )
  VALUES
  (
   @SupplierArticlePriceGUID,
   @SupplierArticleGUID,
   @ValidFrom,
   @ValidTo,
   @UnitOfMeasurement,
   @LotType,
   @LotSize,
   @GrossWeight,
   @NetWeight,
   @UnitPrimeCost,
   @LotPrimeCost,
   @Currency
  )
 END

 SELECT * FROM UpdateArticle UA, UpdateArticlePrice UAP
 WHERE UA.SupplierArticleGUID=UAP.SupplierArticleGUID
  AND UA.SupplierGUID=@SupplierGUID
 --for xml auto, xmldata
GO


 
Old May 15th, 2007, 11:19 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Is that you wanted to fetch all columns from UpdateArticle and UpdateArticlePrice tables together?

_________________________
- Vijay G
Strive for Perfection
 
Old May 15th, 2007, 02:07 PM
Authorized User
 
Join Date: Aug 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, I just wanted to show some sort of confirmation that when the file was picked up by Biztalk that the records were successfully inserted into the sql server. I don't necessarily have to show the records that were inserted just confirm they were.






Similar Threads
Thread Thread Starter Forum Replies Last Post
XML request and get response praveenkumar .NET Web Services 0 May 23rd, 2007 04:13 AM
Http Resquest-response through biztalk server shashi.prakash Biztalk 0 May 7th, 2007 06:46 AM
Query: Biztalk Server 2004 - SQL Adapter simplyvivek Biztalk 1 March 23rd, 2006 06:36 AM
Request and Response from server in XML snarreddi XML 3 December 24th, 2004 07:20 AM
Request-response in Tomcat sherbir Servlets 0 September 4th, 2004 04:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.