[dba-VB] Parameter objects in C# and ADO.

Shamil Salakhetdinov shamil at smsconsulting.spb.ru
Fri Nov 27 15:31:02 CST 2009


Hi John --

I have just posted here a sample for synchronous execution of SP with
params.
You can also run SPs from C# asynchronously - e.g. look MSDN for
BeginExecuteNonQuery method of System.Data.SqlClient.SqlCommand class.

--
Shamil


-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Friday, November 27, 2009 11:26 PM
To: Discussion concerning Visual Basic and related programming issues.
Subject: Re: [dba-VB] Parameter objects in C# and ADO.

 > If a parameter in a stored procedure is declared as an output (returns a
value) will the 
parameter  object in C# / ADO contain that value when the stored procedure
finishes?

This part of the question got lost, not directly answered AFAICT.

I am directly creating parameter objects and adding them to the parameter
collection of the command 
object.  Code execution will halt until the stored procedure finishes
executing and then the 
parameter objects in the command object's parameters collection can be
looked at for the returned 
values?

John W. Colby
www.ColbyConsulting.com


jwcolby wrote:
> If a parameter in a stored procedure is declared as an output (returns a
value) will the parameter 
> object in C# / ADO contain that value when the stored procedure finishes?
> 
> I haven't used output parameters yet in stored procedures.  Can values be
passed in via an output 
> parameter or can it only be set from inside of the stored procedure?
> 

 

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4643 (20091127) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru
 




More information about the dba-VB mailing list