using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Data.SqlClient; namespace ProgramlamaDersi { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void kaydetbutton_Click(object sender, EventArgs e) { string constr = "Data Source=10.10.88.248;Initial Catalog=Northwind;Persist Security Info=True;User ID=ogrenci;Password=sanane1"; SqlConnection con = new SqlConnection(constr); con.Open(); SqlCommand cmd = new SqlCommand(); cmd.Connection = con; cmd.CommandText = "select * from Urunler Order by UrunID desc"; cmd.ExecuteNonQuery(); DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter(cmd); datatable.Fill(dt); } } }