public void secme() {
OleDbConnection bagla = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Server.MapPath("~/App_Data\\data.accdb" + ";Persist Security Info=False"));
OleDbCommand komut = new OleDbCommand();
bagla.Open();
komut.Connection = bagla;
komut.CommandText = "select d from tbl where a='" + TextBox1.Text + "'";
//VERİ TABANINDAKİ SEÇİMİ LABEL1'E YAZDIRIYOR
Label1.Text=(string)komut.ExecuteScalar();
bagla.Close();
}
Hiç yorum yok:
Yorum Gönder