private void lb_SelectedIndexChanged(object sender, EventArgs e) { Myconnection = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0; Password=; Data Source=" + File_Name); Myconnection.Open(); OleDbCommand cmd = Myconnection.CreateCommand(); cmd.CommandText = "SELECT * FROM POST"; OleDbDataAdapter dta = new OleDbDataAdapter(cmd.CommandText, Myconnection); dta = new OleDbDataAdapter(cmd); DataSet dts = new DataSet("POST"); dta.Fill(dts, "POST"); foreach (DataRow row in dts.Tables["POST"].Rows) { TitleBox.Text = row[1, DataRowVersion.Current].ToString(); rtf.Rtf = row[2, DataRowVersion.Current].ToString(); } Myconnection.Close(); lb.Visible = false; }