Question: how to export data from datagridview to sql database in c#?
Answer: SqlDataAdapter da=new SqlDataAdapter("select * from product",strcon); SqlCommandBuilder cb=new SqlCommandBuilder(da); DataSet ds = new DataSet(); da.Fill(ds); dataGridView1.DataSource=ds.Tables[0];