private void btnLoad_Click(object sender, EventArgs e) { SqlCeConnection myConnection = new SqlCeConnection(); myConnection.ConnectionString = @"Data Source=C:\Users\Dell\Desktop\DataGridView\PMinfo.sdf"; SqlCeCommand myCommad = new SqlCeCommand(); myCommad.Connection = myConnection; myCommad.CommandText = "Select * From [PMinfo]"; DataTable myDataTable = new DataTable(); SqlCeDataAdapter myDataAdapter = new SqlCeDataAdapter(); myDataAdapter.SelectCommand = myCommad; myDataAdapter.Fill(myDataTable); dataGridView1.DataSource = myDataTable; }
SELECT * FROM
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)