Datagridview updating database c


I have done this kind of stuffs with vb6, has not done it with C#. the better idea is create a new function in datagridform, then shift(cut & paste) the code which you use to fill datagridview in a new function(means refactor the code to function).

datagridview updating database c-58

Im writing code like this connection String = “Data Source=10.1.2.16.1433;database=Northwind; User ID=sa; Password=sa”; but Sql server2005 error shows like : SQL Server doesn’t allow remote connections. but i want to learn that how we doing this through DLL. I have single button “SAVE” which save the data in the database.

how can i set , update or insert or delete operation on one “SAVE” button.

private void add Upadate Button_Click(object sender, Event Args e) Now, whatever you do with the datagridview like insert or update on the form this will update or insert in to database accordingly. App Settings[“connection String”]; sql Connection = new Sql Connection(connection String); select Query String = “SELECT * FROM Users”; sql Connection.

Is it possible to do the same things(insert,update,delete) with database in this Gridview. Thanx in advance :) Please have a look at this add Upadate Button_Click Event code. It has various type of functionality but comman funcatin are CRUD operation. There are few other links that have described CRUD (Insert, Delete, Update) operation with good explaination and proper sample. ) private String connection String = null; //the string private Sql Connection sql Connection = null; //Sql Connection private Sql Data Adapter sql Data Adapter = null; //Sql Data Adapter private Sql Command Builder sql Command Builder = null; Sql Command Builder private Data Table data Table = null; private Binding Source binding Source = null; private String select Query String = null; private void Form1_Load(object sender, Event Args e) { connection String = Configuration Manager.

Data Grid View Text Box Column cls Col1 = new Data Grid View Text Box Column(); cls Col1.