我正在研究SQLHelper類。以及如何獲得@Email值 ????????sqlhelper輸出參數
protected void Button1_Click(object sender, EventArgs e)
{
try
{
bl.user_id = TextBox1.Text;
DataTable dt= bl.forget();
if (dt.Rows.Count != 0)
{
Response.Write( dt.Rows[0]["@Email"].ToString());
}
}
catch (Exception g)
{
Response.Write(g.Message);
}
}
B11的一部分.......
DataSet ds = SqlHelper.ExecuteDataset(bl.str, CommandType.StoredProcedure,
"forFetPasswo",new SqlParameter("@Email", bl.user_id));
DataTable dt = new DataTable();
if (ds.Tables.Count != 0)
{
dt = ds.Tables[0];
}
return dt;
SQL語句組成部分.......
Alter PROCEDURE Abc
@Email nvarchar(100)output
AS
BEGIN
if (@Email !=null)
begin
if exists(select * from UserLogin where Emailid [email protected])
begin
select @Email ='mail send'
end
end
else
begin
select @Email='invalid email id'
end
END
GO