Quantcast
Viewing all articles
Browse latest Browse all 12583

update datagrid view automaticlly

i work with sql server and i have a table that can be modified from different forms.

and i have a from contain a datagrid view that i want to be updated automatically every one minutes

this is the code to read from table but i don't know how it can be updated :

 SqlConnection conn = new SqlConnection("Data Source=TOSHIBA-C855;Initial Catalog=COFAT;Integrated Security=True");
                SqlCommand cmd = new SqlCommand("SELECT    * FROM  affichage order by date desc", conn);
                conn.Open();
                SqlDataReader rdr = cmd.ExecuteReader();
                BindingSource source = new BindingSource();
                source.DataSource = rdr;
                dataGridView1.DataSource = source;

                conn.Close();

any advice please ?


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>