![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
I am trying to execute a stored procedure that inserts a record with the values I pass to it in parameters, and have it return a single value: that of @@Identity ***** Sample SP Code: ****** create proc MyProc ( << my list of poarameters here >> ) AS INSERT INTO MyTable ( << field list >> ) VALUES ( << parameter values >> ) SELECT @@ IDENTITY *************** end ******* Setting up my Execute SQL Task involves setting up the Parameter Mapping and Result Set pages, with appropriat varialbles. Here's the thing: The task only executes with an ADO.NET type connection, not an OLE DB connection. Why? Since my package also manages records from that same database, I also need an OLE DB type connection for the data flow. Why must I manage TWO connections Types to the SAME database? Other Ececute SQL Tasks seem to execute OK with OLE DB type connections (commands such as TRUNCATE TABLE). -- Todd Chittenden |
![]() |
| Thread Tools | |
| Display Modes | |
| |