calling stored procedure in ADO.NET 2.0

Discussion in 'ASP .Net' started by David Sagenaut, Oct 24, 2005.

  1. 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
    sqlConnection con = new sqlConnection(strCon)
    sqlCommand cmd = sqlCommand("sp_example", con);
    cmd.CommandType = CommandType.StoredProcedure;


    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

    David Sagenaut, Oct 24, 2005
    1. Advertisements

  2. David Sagenaut

    Karl Seguin Guest

    Karl Seguin, Oct 24, 2005
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.