Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Automatic saving edits/inserts made in datagridview into sql

$
0
0

Hello guys I'm solving this issue:
I have datagridview and its connected to table in SQL and now if I made changes in it I would like to automatically save them on button click. As far as I was trying to solve this I made this part of code, but it does nothing:

   public void btn_uloz_sl_Click(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();
            SqlDataAdapter SDA = new SqlDataAdapter("SELECT * FROM zajezd", spojeni);
            SDA.Fill(dt);
            spojeni.Close();
        }

Would somebody help me solve this problém out? thanks so much

Viewing all articles
Browse latest Browse all 2535

Trending Articles



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