calling stored procedure in ADO.NET 2.0

D

David Sagenaut

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top