Answer the question
In order to leave comments, you need to log in
Why is the combobox not populating?
Hello, I filled combobox with text from the database. It has a table that is filled. Actually, I did everything I found on the forum. But the problem is that it doesn't give combobox info.
private void Combobox1_ContextMenuOpening(object sender, ContextMenuEventArgs e)
{
SQLiteConnection conn = new SQLiteConnection("Data Source=C:\\Users\\Степан\\Desktop\\project.db");
SQLiteCommand command = new SQLiteCommand("select * from Dolznosti", conn);
conn.Open();
DbDataReader reader = command.ExecuteReader();
while (reader.Read())
Combobox1.Items.Add((string)reader["FIO"]); //СтолбецТаблицы
conn.Close();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question