private void PopuniListu(){
listBox1.Items.Clear();
conn = new OleDbConnection(connString);
conn.Open();
cmd.Connection = conn;
cmd.CommandType = CommandType.Text;
cmd.CommandText = "SELECT Imeiprezimeautora FROM Tabela1";
dr = cmd.ExecuteReader();
while (dr.Read())
{
listBox1.Items.Add(dr.GetValue(0));
}
dr.Close();
conn.Close();
}
这是错误:
没有为一个或多个必需参数指定值。
博士 = cmd.ExecuteReader()