异常详细信息: System.Data.SqlClient.SqlException: 对象名 'voteMaster1' 无效
源错误:
行 19: con.Open();
行 20: SqlCommand cmd = new SqlCommand("select voteTile from voteMaster1 where voteID="+this.voteID, con);
行 21: string title = Convert.ToString(cmd.ExecuteScalar());
行 22: this.Label1.Text = title;
行 23:
哪位告诉我哪里错了???
源错误:
行 19: con.Open();
行 20: SqlCommand cmd = new SqlCommand("select voteTile from voteMaster1 where voteID="+this.voteID, con);
行 21: string title = Convert.ToString(cmd.ExecuteScalar());
行 22: this.Label1.Text = title;
行 23:
哪位告诉我哪里错了???
行 20: SqlCommand cmd = new SqlCommand("select 1 from northwind ", con);
行 21: string title = Convert.ToString(cmd.ExecuteScalar());
行 22: this.Label1.Text = title;
行 23:
voteMaster1是你数据库里面的一个表吗?