Live link datagridview to SQL (Windows Forms App)

Posted on 2012-08-20
Last Modified: 2012-08-20
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=,1444;Initial Catalog=psql;User ID=MYNAME;Password=PASS;")
Dim dTable As New DataTable

DgvUsers.DataSource = dTable

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?
Question by:GrahamSA
    1 Comment
    LVL 5

    Accepted Solution


    You can do it by editing a cell..

    for your reference:

    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now