![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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? |
#3
| |||
| |||
|
|
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? |
#4
| |||
| |||
|
|
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? |
#5
| |||
| |||
|
|
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? |
#6
| |||
| |||
|
|
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? |
![]() |
| Thread Tools | |
| Display Modes | |
| |