Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OLE DB Command using stored proc in SqlCommand

Status
Not open for further replies.

GFullington

Programmer
Oct 7, 2003
18
US
Configuring an OLE DB Command, need to update each record with a value returned from a stored proc.

The stored proc requires an output variable to store the result from the stored proc.

I then want to update the record with the returned value and write the record to a new destination.

I have declared Param_0 as an external column under inputs.

I have mapped the input column "newid" to Param_0.

The SqlCommand is the following;

Declare @param_0 as binary(8);

execute rsp_getnewid 'SMARTReport',@param_0;

update [smart_report].[dbo].[tblSMARTReportTemp]
set newid = ?;

I know I am missing the where clause, not sure how to pass in a value for the where clause.

Since the OLE DB processes the recordset row by row, how do I update the current row with the returned value from the stored proc?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top