e ();. Items.Clear (); (int i = 0; i
}
} void comboBox1_SelectedIndexChanged (object sender, System.EventArgs e)
{
{= new DataSet (); DBConnectionString = @ "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = db1.mdb";. Data.OleDb.OleDbConnection aCon = new System.Data . OleDb.OleDbConnection (DBConnectionString);. Data.OleDb.OleDbCommand команда = new System.Data.OleDb.OleDbCommand ("", aCon);. Data.OleDb.OleDbDataAdapter adapter = new System.Data.OleDb.OleDbDataAdapter ( команда);. Open ();
команда.CommandText = "SELECT * FROM i = 0; i
}
}
} (Exception err)
{. Show (err.Message);
}
} void button2_Click (object sender, System.EventArgs e)
{
команда.CommandText = "DELETE FROM usery WHERE id =" + lb [listBox1.SelectedIndex];
команда.ExecuteNonQuery ();. Close ();. Open (); = new DataSet ();
команда.CommandText = "SELECT * FROM i = 0; i
}
}
} (Exception err)
{. Show (err.Message);
}
} void button3_Click (object sender, System.EventArgs e)
{. Text = "";
} void button4_Click (object sender, System.EventArgs e)
{DBConnectionString = @ "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = db1.mdb";. Data.OleDb.OleDbConnection aCon = new System.Data.OleDb.OleDbConnection (DBConnectionString );. Data.OleDb.OleDbCommand команда = new System.Data.OleDb.OleDbCommand ("", aCon);. Data.OleDb.OleDbDataAdapter adapter = new System.Data.OleDb.OleDbDataAdapter (команда);
команда.CommandText = "INSERT INTO forum (id_disciplina, textx) VALUES (" + "" + cb [comboBox1.SelectedIndex] + ", '" + textBox1.Text + "')";. Open ();
команда.ExecuteNonQuery ();. Close ();
textBox1.Text = "";
}
}
}
1.