BizTalk Server Orchestration - SQL Receive Adapter

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > April 2005 > SQL Receive Adapter





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author SQL Receive Adapter
Mangi

2005-04-18, 7:52 am

G'day all,
I have a stored proc that retrieves a record from a table, there appears to
be nothing wrong with it. but when i try to add the adapter from "Add
Generated Items" I get an error message "Failed to execute SQL Statement.
Please ensure that the suppied syntax is correct" I have specified the input
parameter and clicked on 'generate'. Any ideas what i've done wrong?

CREATE PROCEDURE spGetDespatchedOrders

@DespatchID Int

AS
Declare @Id int

SELECT TOP 1
@Id = [Id]
FROM [ClientDespatch]
WHERE [InterfaceStatus] = 0

UPDATE [ClientDespatch]
SET [InterfaceStatus] = 10,
[InterfaceDateLastModified] = getdate()
WHERE [Id] = @Id

SELECT [Id],
[OrderNo],
[FromWhse],
[DeliveryNoteNumber],
[ActualShipdate],
[OrderLineNo],
[ProductCode],
[ProductDesc],
[ShippedQuantity],
[InterfaceStatus],
[InterfaceDateReceived],
[InterfaceMessage]
FROM dbo.ClientDespatch
WHERE [Id] = @Id
For XML AUTO, ELEMENTS
GO



Mangi

2005-04-18, 7:52 am

My good buddy Nabeel came to my rescue,
I had to put in XMLDATA when i create the schema using the add generated
items wizard, but remove the XMLDATA after that.

.....
For XML AUTO, ELEMENTS, XMLDATA

Thanks Nabeel.

"Mangi" wrote:

> G'day all,
> I have a stored proc that retrieves a record from a table, there appears to
> be nothing wrong with it. but when i try to add the adapter from "Add
> Generated Items" I get an error message "Failed to execute SQL Statement.
> Please ensure that the suppied syntax is correct" I have specified the input
> parameter and clicked on 'generate'. Any ideas what i've done wrong?
>
> CREATE PROCEDURE spGetDespatchedOrders
>
> @DespatchID Int
>
> AS
> Declare @Id int
>
> SELECT TOP 1
> @Id = [Id]
> FROM [ClientDespatch]
> WHERE [InterfaceStatus] = 0
>
> UPDATE [ClientDespatch]
> SET [InterfaceStatus] = 10,
> [InterfaceDateLastModified] = getdate()
> WHERE [Id] = @Id
>
> SELECT [Id],
> [OrderNo],
> [FromWhse],
> [DeliveryNoteNumber],
> [ActualShipdate],
> [OrderLineNo],
> [ProductCode],
> [ProductDesc],
> [ShippedQuantity],
> [InterfaceStatus],
> [InterfaceDateReceived],
> [InterfaceMessage]
> FROM dbo.ClientDespatch
> WHERE [Id] = @Id
> For XML AUTO, ELEMENTS
> GO
>
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com