本文介绍了如何在页面上调用此过程。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
DROP PROCEDURE IF EXISTS hms.Select_LastDate_Result;
CREATE PROCEDURE hms.`Select_LastDate_Result`()
BEGIN
SELECT Current_Test_Date as 'Last_Date'
FROM patient_progress_tracking_details
ORDER BY Current_Test_Date DESC limit 1;
SELECT Test_Result as 'Result'
FROM patient_progress_tracking_details
ORDER BY Current_Test_Date DESC limit 1;
END;
这是我的cs文件..
this is my cs file..
protected void Imgbtnsave_Click(object sender, ImageClickEventArgs e)
{
MySqlConnection StrConnection = null;
MySqlCommand StrCommand = null;
try
{
StrConnection = new MySqlConnection();
StrConnection.ConnectionString = StrConn;
StrConnection.Open();
StrCommand = new MySqlCommand();
StrCommand.CommandType = CommandType.StoredProcedure;
StrCommand.CommandText = "Select_LastDate_Result";
StrCommand.Connection = StrConnection;
StrCommand.ExecuteNonQuery();
BindCarePlan();
}
catch (Exception ex)
{
obj.InfoEntry(DateTime.Now + " " + "BtnSave1_Click" + " " + "AccountBalance.aspx" + " " + ex.Message, "");
obj.InfoEntry(DateTime.Now + " " + ex.StackTrace, "");
Session["strerrormsg"] = DateTime.Now + " " + "BtnSave1_Click" + " " + "AccountBalance.aspx" + " " + ex.Message;
Session["strerrortrace"] = DateTime.Now + " " + ex.StackTrace;
Response.Redirect("ErrorPage.aspx");
}
finally
{
StrConnection.Close();
StrConnection.Dispose();
}
}
}
此代码不起作用..
this code is not working..
推荐答案
这篇关于如何在页面上调用此过程。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!