必须声明标量变量
string mystr, mysql;OleDbConnection myconn = new OleDbConnection();
OleDbCommand mycmd = new OleDbCommand();
mystr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=H:\\C#2010\\school.mdb";
myconn.ConnectionString = mystr;
myconn.Open();
mysql = "select avg(分数) from score where 学号=@no";
= mysql;
mycmd.Connection = myconn;
mycmd.Parameters.Add("@no", OleDbType.VarChar, 5).Value = textBox1.Text;
textBox2.Text = mycmd.ExecuteScalar().ToString();
myconn.Close();
程序执行时报错“必须申明标量变量@no”,请高手指导