
Can't pass return value or output parameter to ADO if storeproc updates
Thank you so much for the essential info.
It's weird that we have to close connection to see parameter.
It's too bad that we can't process recordset and parameter at the same time
or depending on the value of parameter.
Quote:
> 1 - Use SET NOCOUNT ON/OFF to avoid that sql server returns the message
> (xxx rows affected) as recordset.
> 2 - Use SET to assign values to variables, if not, you will return another
> recordset, so you will have to use set objRs = objRs.NextRecordset.
> 3 - If you want to return:
> select id
> from idname
> then, in your client programm, you have to process the recordset and
> then close it before accessing output parameters and return value.
> Greetings,
> Alejandro Mesa
> > In the following procedure I get output parameter without update sql
part,
> > and don't get it with update.
> > I need to run update records and pass an output parameter to ADO in VB.
> > How can we pass output parameter when we update rows in stored
procedure?
> > For your reference return value or output parameter are not passed to
ADO
> > command parameters if it's not associated with select statement.
> > http://support.microsoft.com/support/kb/articles/Q194/7/92.ASP
> > Thank you very much
> > ---------------------stored procedure
> > create proc bi
> > as
> > update idname
> > set price = 1000
> > select id from idname