Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 655
  • Last Modified:

Live link datagridview to SQL (Windows Forms App)

HI Fellas

Hope you all had a great weekend...

I have a datagridview which is updated using the following code
Dim dbadp As New SqlClient.SqlDataAdapter("Select * From Users", "Data Source=196.220.43.247,1444;Initial Catalog=psql;User ID=MYNAME;Password=PASS;")
Dim dTable As New DataTable
dbadp.Fill(dTable)
dbadp.Dispose()

DgvUsers.DataSource = dTable
Me.UsersTableAdapter.Fill(Me.PsqlDataSetUsera.Users)

Open in new window


I would like to be able to edit a cell in the datagridview and it update the table in SQL.
Is this possible? or will I have to do some kind of update button?
0
GrahamSA
Asked:
GrahamSA
1 Solution
 
indrajitmahajanCommented:
Hi..

You can do it by editing a cell..

for your reference:
http://www.dotnetspider.com/resources/17855-Use-SqlCommandBuilder.aspx
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now