dbTalk Databases Forums  

Parameter trouble in a OLE DB Source

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Parameter trouble in a OLE DB Source in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
blueoyester
 
Posts: n/a

Default Parameter trouble in a OLE DB Source - 07-02-2006 , 11:51 PM






I'm trying to pass a parameter of type int to a SP by using ? in a OLE DB
Source. I have selected "SQL command" in connection manager. The command is
as follows:
EXEC PromoPoint.dbo.Load_PointsHistory ?
In the mapping options, Prameter0 is mapped to a User::RunId variable which
is of type int32. It just won't parse the SQL command neither will it give me
a preview.

Error while parsing as below:
Invalid parameter number

Error on preview:
No value given for one or more required parameters. (Microsoft SQL Native
Client)

Is this a bug or am I doing something wrong here?



Reply With Quote
  #2  
Old   
blueoyester
 
Posts: n/a

Default RE: Parameter trouble in a OLE DB Source - 07-03-2006 , 03:30 PM






The problem is related to SSIS. Thought I'd specify to make things clear.

"blueoyester" wrote:

Quote:
I'm trying to pass a parameter of type int to a SP by using ? in a OLE DB
Source. I have selected "SQL command" in connection manager. The command is
as follows:
EXEC PromoPoint.dbo.Load_PointsHistory ?
In the mapping options, Prameter0 is mapped to a User::RunId variable which
is of type int32. It just won't parse the SQL command neither will it give me
a preview.

Error while parsing as below:
Invalid parameter number

Error on preview:
No value given for one or more required parameters. (Microsoft SQL Native
Client)

Is this a bug or am I doing something wrong here?



Reply With Quote
  #3  
Old   
Allan Mitchell
 
Posts: n/a

Default RE: Parameter trouble in a OLE DB Source - 07-04-2006 , 01:45 PM



Hello blueoyester,

You cannot preview the parameterised query like this.

Does it actually work and run?


Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
The problem is related to SSIS. Thought I'd specify to make things
clear.

"blueoyester" wrote:

I'm trying to pass a parameter of type int to a SP by using ? in a
OLE DB
Source. I have selected "SQL command" in connection manager. The
command is
as follows:
EXEC PromoPoint.dbo.Load_PointsHistory ?
In the mapping options, Prameter0 is mapped to a User::RunId variable
which
is of type int32. It just won't parse the SQL command neither will it
give me
a preview.
Error while parsing as below: Invalid parameter number

Error on preview:
No value given for one or more required parameters. (Microsoft SQL
Native
Client)
Is this a bug or am I doing something wrong here?




Reply With Quote
  #4  
Old   
blueoyester
 
Posts: n/a

Default RE: Parameter trouble in a OLE DB Source - 07-04-2006 , 06:35 PM



If I try running the package it gives an error as below:
Error: The SQL command requires a parameter named "@RunID", which is not
found in the parameter mapping.

I tried running the statement as below
EXEC PromoPoint.dbo.Load_PromoPointHistory @runId = ? and still got the same
error message.

Any ideas?

cheers,
anupam



"Allan Mitchell" wrote:

Quote:
Hello blueoyester,

You cannot preview the parameterised query like this.

Does it actually work and run?


Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

The problem is related to SSIS. Thought I'd specify to make things
clear.

"blueoyester" wrote:

I'm trying to pass a parameter of type int to a SP by using ? in a
OLE DB
Source. I have selected "SQL command" in connection manager. The
command is
as follows:
EXEC PromoPoint.dbo.Load_PointsHistory ?
In the mapping options, Prameter0 is mapped to a User::RunId variable
which
is of type int32. It just won't parse the SQL command neither will it
give me
a preview.
Error while parsing as below: Invalid parameter number

Error on preview:
No value given for one or more required parameters. (Microsoft SQL
Native
Client)
Is this a bug or am I doing something wrong here?





Reply With Quote
  #5  
Old   
blueoyester
 
Posts: n/a

Default RE: Parameter trouble in a OLE DB Source - 07-04-2006 , 07:21 PM



Hey! I'm glad I found the problem. I needed to name the parameter as "@runId"
including the @ sign, which is also the name of the parameter that the SP
expects.
Works well now.

Thanks for your time.

Cheers!

"blueoyester" wrote:

Quote:
If I try running the package it gives an error as below:
Error: The SQL command requires a parameter named "@RunID", which is not
found in the parameter mapping.

I tried running the statement as below
EXEC PromoPoint.dbo.Load_PromoPointHistory @runId = ? and still got the same
error message.

Any ideas?

cheers,
anupam



"Allan Mitchell" wrote:

Hello blueoyester,

You cannot preview the parameterised query like this.

Does it actually work and run?


Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

The problem is related to SSIS. Thought I'd specify to make things
clear.

"blueoyester" wrote:

I'm trying to pass a parameter of type int to a SP by using ? in a
OLE DB
Source. I have selected "SQL command" in connection manager. The
command is
as follows:
EXEC PromoPoint.dbo.Load_PointsHistory ?
In the mapping options, Prameter0 is mapped to a User::RunId variable
which
is of type int32. It just won't parse the SQL command neither will it
give me
a preview.
Error while parsing as below: Invalid parameter number

Error on preview:
No value given for one or more required parameters. (Microsoft SQL
Native
Client)
Is this a bug or am I doing something wrong here?





Reply With Quote
  #6  
Old   
Allan Mitchell
 
Posts: n/a

Default RE: Parameter trouble in a OLE DB Source - 07-24-2006 , 01:49 PM



Hello blueoyester,


Have a look at this article for a full discussion on the ExecuteSQL task


http://www.sqlis.com/default.aspx?58



Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
Hey! I'm glad I found the problem. I needed to name the parameter as
"@runId"
including the @ sign, which is also the name of the parameter that the
SP
expects.
Works well now.
Thanks for your time.

Cheers!

"blueoyester" wrote:

If I try running the package it gives an error as below:
Error: The SQL command requires a parameter named "@RunID", which is
not
found in the parameter mapping.
I tried running the statement as below
EXEC PromoPoint.dbo.Load_PromoPointHistory @runId = ? and still got
the same
error message.
Any ideas?

cheers,
anupam
"Allan Mitchell" wrote:

Hello blueoyester,

You cannot preview the parameterised query like this.

Does it actually work and run?

Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com
The problem is related to SSIS. Thought I'd specify to make things
clear.

"blueoyester" wrote:

I'm trying to pass a parameter of type int to a SP by using ? in a
OLE DB
Source. I have selected "SQL command" in connection manager. The
command is
as follows:
EXEC PromoPoint.dbo.Load_PointsHistory ?
In the mapping options, Prameter0 is mapped to a User::RunId
variable
which
is of type int32. It just won't parse the SQL command neither will
it
give me
a preview.
Error while parsing as below: Invalid parameter number
Error on preview:
No value given for one or more required parameters. (Microsoft SQL
Native
Client)
Is this a bug or am I doing something wrong here?



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.