Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Execute SQL Task using ADO.NET connection To execute a stored procedure with input parameters

$
0
0

I am getting an error trying to execute a stored procedure with two input parameters using the SQL Execute task with ADO.NET connection. Everything works fine for OLE DB connection, ODBC connection and ADO connection.

I created an ADO.NET connection manager. Connection tested successful

I created an SQL Execute Task

I created two variables, vStudentID (integer), and vCourseID (integer)

this is an example in sql management studio...

exec [school].[assign_course_to_student]
@studentid=10,
@courseid=7

in the SQL Execute Task I select ADO.NET for connection type, from drop down I select the ADO.NET connection

my SQL Source Type is direct input

my sql statement is just the name of the stored procedure (no exec) [school].[assign_course_to_student]  or no parameters

p.s. doesn't work with it either

isquerystoredprocedure is set to true

in the parameter mapping tab I map my two variables to the exact name of the stored procedure parameters, @studentid and @coursed

I get the following error:

[Execute SQL Task] Error: Executing the query "[school].[assign_course_to_student] " failed with the following error: "Could not find stored procedure ''.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

ive tried changing the result set, adding parameters in sql statement, using place holders for values (?) or parameter name, tried isquerystoredprocedure set to false

Nothing Works

Please help

Thanks


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>