Showing posts with label posting. Show all posts
Showing posts with label posting. Show all posts

Sunday, March 11, 2012

Can SSIS work with an XML web service? (Verisign Payflow Pro)

I'm trying to figure out a solution for posting financial transactions against our Payflow Pro (Verisign) payment gateway (web service) using SSIS. The process I have in my mind goes like this...

1.) Select the appropriate records from our financial system DB.

2.) Iterate through each record and post the pertinent values against the payment gateway web service.

3.) Create log files for successful and failed transactions.

The log files would then be manually imported into our financial system.

Thanks in advance.

There is no web service or XML data flow destination, unfortunately. You could write a custom destination component to call your web service.|||

jwelch wrote:

There is no web service or XML data flow destination, unfortunately. You could write a custom destination component to call your web service.

Not entirely true... You can stick a Web service task in a foreach loop that spins through the recordset. Then you merely map the appropriate variables to the Web service.

This is done on the control flow, though, so you'd need to perhaps stage your data first in the data flow and then select it with an Execute SQL task to load up your ADO recordset.|||My bad, I was focused on the data flow. Good approach.|||Great info! I'll look into that.

Friday, February 24, 2012

Can someone explain why this stored proc does not work?

Sorry if this angers anyone. I'm posting here and to the .NET group. I
am unable to get a return value from a stored procedure in .NET using
the following Sproc and .NET code
Here is the code in my stored proc.
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[sprocRetArtistSerial]
-- Add the parameters for the stored procedure here
@.sArtist varchar(50),
@.sRetArtist bigint OUTPUT
AS
BEGIN
SET @.sRetArtist = (SELECT artSerial FROM tblArtists WHERE artName =
@.sArtist)
END
I am calling it like this...
Dim iArtSer As Integer
Dim sProc As ADODB.Command
sProc = New ADODB.Command
sProc.CommandText = "sprocRetArtistSerial"
sProc.CommandType = ADODB.CommandTypeEnum.adCmdStoredProc
sProc.ActiveConnection = oConn 'the connection is open and
global
sProc.Parameters.Append(sProc.CreateParameter("@.sA rtist",
ADODB.DataTypeEnum.adVarChar,
ADODB.ParameterDirectionEnum.adParamInput, 50, "Iron Maiden"))
sProc.Parameters.Append(sProc.CreateParameter("@.sR etArtist",
ADODB.DataTypeEnum.adBigInt,
ADODB.ParameterDirectionEnum.adParamOutput))
sProc.Execute()
iArtSer = sProc("@.sRetArtist).Value
How about making your statement this:
SELECT @.sRetArtist = artSerial FROM tblArtists WHERE artName = @.sArtist
Also, try to post a bit more information than you did. Did the sproc
compile? Does it give you the right output if you execute it in query
analyzer (this would narrow the problem down to database or .NET stuff too)?
Do you get an error when calling it from .NET?
TheSQLGuru
President
Indicium Resources, Inc.
"jbonifacejr" <jbonifacejr@.hotmail.com> wrote in message
news:1177732180.342492.313570@.n59g2000hsh.googlegr oups.com...
> Sorry if this angers anyone. I'm posting here and to the .NET group. I
> am unable to get a return value from a stored procedure in .NET using
> the following Sproc and .NET code
>
> Here is the code in my stored proc.
> set ANSI_NULLS ON
> set QUOTED_IDENTIFIER ON
> GO
> ALTER PROCEDURE [dbo].[sprocRetArtistSerial]
> -- Add the parameters for the stored procedure here
> @.sArtist varchar(50),
> @.sRetArtist bigint OUTPUT
> AS
> BEGIN
> SET @.sRetArtist = (SELECT artSerial FROM tblArtists WHERE artName =
> @.sArtist)
> END
>
> I am calling it like this...
> Dim iArtSer As Integer
> Dim sProc As ADODB.Command
> sProc = New ADODB.Command
> sProc.CommandText = "sprocRetArtistSerial"
> sProc.CommandType = ADODB.CommandTypeEnum.adCmdStoredProc
> sProc.ActiveConnection = oConn 'the connection is open and
> global
> sProc.Parameters.Append(sProc.CreateParameter("@.sA rtist",
> ADODB.DataTypeEnum.adVarChar,
> ADODB.ParameterDirectionEnum.adParamInput, 50, "Iron Maiden"))
>
> sProc.Parameters.Append(sProc.CreateParameter("@.sR etArtist",
> ADODB.DataTypeEnum.adBigInt,
> ADODB.ParameterDirectionEnum.adParamOutput))
> sProc.Execute()
> iArtSer = sProc("@.sRetArtist).Value
>
|||Hi
"jbonifacejr" wrote:

> Sorry if this angers anyone. I'm posting here and to the .NET group. I
> am unable to get a return value from a stored procedure in .NET using
> the following Sproc and .NET code
>
> Here is the code in my stored proc.
> set ANSI_NULLS ON
> set QUOTED_IDENTIFIER ON
> GO
> ALTER PROCEDURE [dbo].[sprocRetArtistSerial]
> -- Add the parameters for the stored procedure here
> @.sArtist varchar(50),
> @.sRetArtist bigint OUTPUT
> AS
> BEGIN
> SET @.sRetArtist = (SELECT artSerial FROM tblArtists WHERE artName =
> @.sArtist)
> END
>
> I am calling it like this...
> Dim iArtSer As Integer
> Dim sProc As ADODB.Command
> sProc = New ADODB.Command
> sProc.CommandText = "sprocRetArtistSerial"
> sProc.CommandType = ADODB.CommandTypeEnum.adCmdStoredProc
> sProc.ActiveConnection = oConn 'the connection is open and
> global
> sProc.Parameters.Append(sProc.CreateParameter("@.sA rtist",
> ADODB.DataTypeEnum.adVarChar,
> ADODB.ParameterDirectionEnum.adParamInput, 50, "Iron Maiden"))
>
> sProc.Parameters.Append(sProc.CreateParameter("@.sR etArtist",
> ADODB.DataTypeEnum.adBigInt,
> ADODB.ParameterDirectionEnum.adParamOutput))
> sProc.Execute()
> iArtSer = sProc("@.sRetArtist).Value
>
You don't say if you get an error and what it is?
Have you run the procedure with the given parameters and got a value back?
I think you would need
Set sProc = New ADODB.Command
There aer missing quotes in:
iArtSer = sProc("@.sRetArtist).Value
John

Can someone explain why this stored proc does not work?

Sorry if this angers anyone. I'm posting here and to the .NET group. I
am unable to get a return value from a stored procedure in .NET using
the following Sproc and .NET code
Here is the code in my stored proc.
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[sprocRetArtistSerial]
-- Add the parameters for the stored procedure here
@.sArtist varchar(50),
@.sRetArtist bigint OUTPUT
AS
BEGIN
SET @.sRetArtist = (SELECT artSerial FROM tblArtists WHERE artName = @.sArtist)
END
I am calling it like this...
Dim iArtSer As Integer
Dim sProc As ADODB.Command
sProc = New ADODB.Command
sProc.CommandText = "sprocRetArtistSerial"
sProc.CommandType = ADODB.CommandTypeEnum.adCmdStoredProc
sProc.ActiveConnection = oConn 'the connection is open and
global
sProc.Parameters.Append(sProc.CreateParameter("@.sArtist",
ADODB.DataTypeEnum.adVarChar,
ADODB.ParameterDirectionEnum.adParamInput, 50, "Iron Maiden"))
sProc.Parameters.Append(sProc.CreateParameter("@.sRetArtist",
ADODB.DataTypeEnum.adBigInt,
ADODB.ParameterDirectionEnum.adParamOutput))
sProc.Execute()
iArtSer = sProc("@.sRetArtist).ValueHow about making your statement this:
SELECT @.sRetArtist = artSerial FROM tblArtists WHERE artName = @.sArtist
Also, try to post a bit more information than you did. Did the sproc
compile? Does it give you the right output if you execute it in query
analyzer (this would narrow the problem down to database or .NET stuff too)?
Do you get an error when calling it from .NET?
--
TheSQLGuru
President
Indicium Resources, Inc.
"jbonifacejr" <jbonifacejr@.hotmail.com> wrote in message
news:1177732180.342492.313570@.n59g2000hsh.googlegroups.com...
> Sorry if this angers anyone. I'm posting here and to the .NET group. I
> am unable to get a return value from a stored procedure in .NET using
> the following Sproc and .NET code
>
> Here is the code in my stored proc.
> set ANSI_NULLS ON
> set QUOTED_IDENTIFIER ON
> GO
> ALTER PROCEDURE [dbo].[sprocRetArtistSerial]
> -- Add the parameters for the stored procedure here
> @.sArtist varchar(50),
> @.sRetArtist bigint OUTPUT
> AS
> BEGIN
> SET @.sRetArtist = (SELECT artSerial FROM tblArtists WHERE artName => @.sArtist)
> END
>
> I am calling it like this...
> Dim iArtSer As Integer
> Dim sProc As ADODB.Command
> sProc = New ADODB.Command
> sProc.CommandText = "sprocRetArtistSerial"
> sProc.CommandType = ADODB.CommandTypeEnum.adCmdStoredProc
> sProc.ActiveConnection = oConn 'the connection is open and
> global
> sProc.Parameters.Append(sProc.CreateParameter("@.sArtist",
> ADODB.DataTypeEnum.adVarChar,
> ADODB.ParameterDirectionEnum.adParamInput, 50, "Iron Maiden"))
>
> sProc.Parameters.Append(sProc.CreateParameter("@.sRetArtist",
> ADODB.DataTypeEnum.adBigInt,
> ADODB.ParameterDirectionEnum.adParamOutput))
> sProc.Execute()
> iArtSer = sProc("@.sRetArtist).Value
>|||Hi
"jbonifacejr" wrote:
> Sorry if this angers anyone. I'm posting here and to the .NET group. I
> am unable to get a return value from a stored procedure in .NET using
> the following Sproc and .NET code
>
> Here is the code in my stored proc.
> set ANSI_NULLS ON
> set QUOTED_IDENTIFIER ON
> GO
> ALTER PROCEDURE [dbo].[sprocRetArtistSerial]
> -- Add the parameters for the stored procedure here
> @.sArtist varchar(50),
> @.sRetArtist bigint OUTPUT
> AS
> BEGIN
> SET @.sRetArtist = (SELECT artSerial FROM tblArtists WHERE artName => @.sArtist)
> END
>
> I am calling it like this...
> Dim iArtSer As Integer
> Dim sProc As ADODB.Command
> sProc = New ADODB.Command
> sProc.CommandText = "sprocRetArtistSerial"
> sProc.CommandType = ADODB.CommandTypeEnum.adCmdStoredProc
> sProc.ActiveConnection = oConn 'the connection is open and
> global
> sProc.Parameters.Append(sProc.CreateParameter("@.sArtist",
> ADODB.DataTypeEnum.adVarChar,
> ADODB.ParameterDirectionEnum.adParamInput, 50, "Iron Maiden"))
>
> sProc.Parameters.Append(sProc.CreateParameter("@.sRetArtist",
> ADODB.DataTypeEnum.adBigInt,
> ADODB.ParameterDirectionEnum.adParamOutput))
> sProc.Execute()
> iArtSer = sProc("@.sRetArtist).Value
>
You don't say if you get an error and what it is?
Have you run the procedure with the given parameters and got a value back?
I think you would need
Set sProc = New ADODB.Command
There aer missing quotes in:
iArtSer = sProc("@.sRetArtist).Value
John

Can someone explain why this stored proc does not work?

Sorry if this angers anyone. I'm posting here and to the .NET group. I
am unable to get a return value from a stored procedure in .NET using
the following Sproc and .NET code
Here is the code in my stored proc.
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[sprocRetArtistSerial]
-- Add the parameters for the stored procedure here
@.sArtist varchar(50),
@.sRetArtist bigint OUTPUT
AS
BEGIN
SET @.sRetArtist = (SELECT artSerial FROM tblArtists WHERE artName =
@.sArtist)
END
I am calling it like this...
Dim iArtSer As Integer
Dim sProc As ADODB.Command
sProc = New ADODB.Command
sProc.CommandText = "sprocRetArtistSerial"
sProc.CommandType = ADODB.CommandTypeEnum.adCmdStoredProc
sProc.ActiveConnection = oConn 'the connection is open and
global
sProc.Parameters.Append(sProc.CreateParameter("@.sArtist",
ADODB.DataTypeEnum.adVarChar,
ADODB.ParameterDirectionEnum.adParamInput, 50, "Iron Maiden"))
sProc.Parameters.Append(sProc.CreateParameter("@.sRetArtist",
ADODB.DataTypeEnum.adBigInt,
ADODB.ParameterDirectionEnum.adParamOutput))
sProc.Execute()
iArtSer = sProc("@.sRetArtist).ValueHow about making your statement this:
SELECT @.sRetArtist = artSerial FROM tblArtists WHERE artName = @.sArtist
Also, try to post a bit more information than you did. Did the sproc
compile? Does it give you the right output if you execute it in query
analyzer (this would narrow the problem down to database or .NET stuff too)?
Do you get an error when calling it from .NET?
TheSQLGuru
President
Indicium Resources, Inc.
"jbonifacejr" <jbonifacejr@.hotmail.com> wrote in message
news:1177732180.342492.313570@.n59g2000hsh.googlegroups.com...
> Sorry if this angers anyone. I'm posting here and to the .NET group. I
> am unable to get a return value from a stored procedure in .NET using
> the following Sproc and .NET code
>
> Here is the code in my stored proc.
> set ANSI_NULLS ON
> set QUOTED_IDENTIFIER ON
> GO
> ALTER PROCEDURE [dbo].[sprocRetArtistSerial]
> -- Add the parameters for the stored procedure here
> @.sArtist varchar(50),
> @.sRetArtist bigint OUTPUT
> AS
> BEGIN
> SET @.sRetArtist = (SELECT artSerial FROM tblArtists WHERE artName =
> @.sArtist)
> END
>
> I am calling it like this...
> Dim iArtSer As Integer
> Dim sProc As ADODB.Command
> sProc = New ADODB.Command
> sProc.CommandText = "sprocRetArtistSerial"
> sProc.CommandType = ADODB.CommandTypeEnum.adCmdStoredProc
> sProc.ActiveConnection = oConn 'the connection is open and
> global
> sProc.Parameters.Append(sProc.CreateParameter("@.sArtist",
> ADODB.DataTypeEnum.adVarChar,
> ADODB.ParameterDirectionEnum.adParamInput, 50, "Iron Maiden"))
>
> sProc.Parameters.Append(sProc.CreateParameter("@.sRetArtist",
> ADODB.DataTypeEnum.adBigInt,
> ADODB.ParameterDirectionEnum.adParamOutput))
> sProc.Execute()
> iArtSer = sProc("@.sRetArtist).Value
>|||Hi
"jbonifacejr" wrote:

> Sorry if this angers anyone. I'm posting here and to the .NET group. I
> am unable to get a return value from a stored procedure in .NET using
> the following Sproc and .NET code
>
> Here is the code in my stored proc.
> set ANSI_NULLS ON
> set QUOTED_IDENTIFIER ON
> GO
> ALTER PROCEDURE [dbo].[sprocRetArtistSerial]
> -- Add the parameters for the stored procedure here
> @.sArtist varchar(50),
> @.sRetArtist bigint OUTPUT
> AS
> BEGIN
> SET @.sRetArtist = (SELECT artSerial FROM tblArtists WHERE artName =
> @.sArtist)
> END
>
> I am calling it like this...
> Dim iArtSer As Integer
> Dim sProc As ADODB.Command
> sProc = New ADODB.Command
> sProc.CommandText = "sprocRetArtistSerial"
> sProc.CommandType = ADODB.CommandTypeEnum.adCmdStoredProc
> sProc.ActiveConnection = oConn 'the connection is open and
> global
> sProc.Parameters.Append(sProc.CreateParameter("@.sArtist",
> ADODB.DataTypeEnum.adVarChar,
> ADODB.ParameterDirectionEnum.adParamInput, 50, "Iron Maiden"))
>
> sProc.Parameters.Append(sProc.CreateParameter("@.sRetArtist",
> ADODB.DataTypeEnum.adBigInt,
> ADODB.ParameterDirectionEnum.adParamOutput))
> sProc.Execute()
> iArtSer = sProc("@.sRetArtist).Value
>
You don't say if you get an error and what it is?
Have you run the procedure with the given parameters and got a value back?
I think you would need
Set sProc = New ADODB.Command
There aer missing quotes in:
iArtSer = sProc("@.sRetArtist).Value
John