protected void Button2_Click(object sender, EventArgs e)
{
Response.Write(Execute("SELECT NOW()"));
}
public string Execute(string storedProcedureName)
{
using (EntityConnection connection = (EntityConnection)new EGModel.EGEntity().Connection)
{
using (EntityCommand command = connection.CreateCommand())
{
command.CommandType = CommandType.Text;
command.CommandText = storedProcedureName;
connection.Open();
return command.ExecuteScalar().ToString();
}
}
}
「クエリ構文が無効です。行 1、列 13 の近くです。」というエラーが表示されます。非常に興味がありますが、なぜこのエラーが発生するのでしょうか? (Mysql エンティティ接続)