データベース内の特定の列のすべての値を持つコンボボックスを作成するにはどうすればよいですか。名前の付いた列がStudentName
あり、すべての値を含むコンボボックスが必要ですStudentName
。
sql = new SqlConnection(@"Data Source=PC-PC\PC;Initial Catalog=Anbar;Integrated Security=True");
adapter = new SqlDataAdapter("select * from School", sql);
どうすれば続行できますか?これらのコードを継続するためのいくつかのコードを教えてください。助けていただければ幸いです。