eBA Kodunda DB Bağlantısı Açma ve Sql Sorgusu Yazma

eBADB.eBADBProvider db=new eBADB.eBADBProvider();
db.Connection.Open();
try

{
System.Data.Common.DbCommand cmd=db.Factory.CreateCommand();
cmd.Connection=db.Connection;
cmd.CommandText=”SELECT * FROM TabloAdi”;
System.Data.Common.DbDataReader dr=cmd.ExecuteReader();
while(dr.Read())

{
}
}
finally

{
db.Connection.Close();

}

Bir Cevap Yazın

%d blogcu bunu beğendi: