[WebMethod]
public DataSet GetSPData() {
SqlConnection con;
SqlCommand cmd;
SqlDataAdapter adpt;
DataSet ds = new DataSet();
string SP = "certifica.ObtenerCodigoCurso";
con = new SqlConnection(ConfigurationManager.ConnectionStrings["YourConnectionString"].ConnectionString);
cmd = new SqlCommand(SP, con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@abreviatura ", SqlDbType.NVarChar, 10).Value = "PARAMVALUE";
adpt = new SqlDataAdapter(cmd);
con.Open();
adpt.Fill(ds);
con.Close();
return ds;
}
|