Guest User

Untitled

a guest
May 24th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. protected DataTable VeriGetir() { SqlConnection baglanti = new SqlConnection(); baglanti.ConnectionString = "Data Source=.; Initial Catalog=Northwind; Integrated Security=True"; SqlCommand komut = new SqlCommand(); komut.Connection = baglanti; komut.CommandText = "Select TOP 5 ProductID,ProductName,UnitPrice FROM Products"; SqlDataAdapter adapter = new SqlDataAdapter(komut); DataTable dt = new DataTable(); adapter.Fill(dt); return dt; }
Add Comment
Please, Sign In to add comment