using System.Data.SqlClient; SqlConnection baglanti = new - TopicsExpress



          

using System.Data.SqlClient; SqlConnection baglanti = new SqlConnection(); baglanti.ConnectionString = Server=localhost;Database=Northwind; User=sa; password=123; SqlCommand komut = new SqlCommand(); komut.CommandText = select * from categories; komut.Connection = baglanti; baglanti.Open(); while(oku.Read()) { string kategoriadi = oku[CategoryName].ToString(); listBox1.Items.Add(kategoriadi); // listeye okunan kategori adı eklenir. } baglanti.Close(); SqlConnection baglanti = new SqlConnection(Server=.;Database=Northwind;Integrated Security=true); SqlCommand komut = new SqlCommand(Select * from products, baglanti); baglanti.Open(); SqlDataReader okuyucu = komut.ExecuteReader(); while (okuyucu.Read()) { listBox1.Items.Add(okuyucu[Productname]); } baglanti.Close(); Furkan Sarıtemur Aykut Yahşi Kadir Can ADO. NET e giriş
Posted on: Sun, 28 Dec 2014 23:44:03 +0000

Trending Topics



Recently Viewed Topics




© 2015