By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,759 Members | 1,251 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,759 IT Pros & Developers. It's quick & easy.

calling a stored procedure in ADO.NET 2.0

P: n/a
How can I calling a stored procedure (say "sp_example") in ADO.NET 2.0? I
used to do this in ADO.NET 1.1, but in 2.0 (beta2 vs2005), after the
following
...
sqlConnection con = new sqlConnection(strCon)
sqlCommand cmd = sqlCommand("sp_example", con);
cmd.CommandType = CommandType.StoredProcedure;

cmd.Parameters.???

under the Parameters property, I only find the AddRange() and AddWithValue()
method, but not the Add() method which is in ADO.NET 1.1. Does anyone have
an idea how to call a stored procedure in the new 2.0 framwork? Thanks in
advance.

David
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
You must have a configuration problem. I am using the Add method in many
applications using beta 2.

"David Sagenaut" wrote:
How can I calling a stored procedure (say "sp_example") in ADO.NET 2.0? I
used to do this in ADO.NET 1.1, but in 2.0 (beta2 vs2005), after the
following
...
sqlConnection con = new sqlConnection(strCon)
sqlCommand cmd = sqlCommand("sp_example", con);
cmd.CommandType = CommandType.StoredProcedure;

cmd.Parameters.???

under the Parameters property, I only find the AddRange() and AddWithValue()
method, but not the Add() method which is in ADO.NET 1.1. Does anyone have
an idea how to call a stored procedure in the new 2.0 framwork? Thanks in
advance.

David

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.