System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection(); conn.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;" + @"Data Source=C:\Documents and Settings\User1\My Documents\\test.mdb"; System.Data.OleDb.OleDbCommand cmd = new System.Data.OleDb.OleDbCommand(); OleDbDataAdapter da = new OleDbDataAdapter("select ID,Name from tab", conn); DataSet ds=new DataSet(); da.TableMappings.Add("Table", "tab"); da.Fill(ds); DataTable myDataTable = ds.Tables[0]; comboBox1.DataSource = myDataTable; comboBox1.DisplayMember = "Name"; // comboBox1.ValueMember = "Name"; this.dviewmanager = ds.DefaultViewManager; this.textBox1.DataBindings.Add("Text", this.dviewmanager, "tab.ID"); this.textBox2.DataBindings.Add("Text", this.dviewmanager, "tab.Name"); this.textBox3.DataBindings.Add("Text", this.dviewmanager, "tab.Pword");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)