Visual Basic, Update Database Using DataGridView

Posted on 2012-09-17
Last Modified: 2012-09-21
Hi Everyone,

I am creating a visual basic application that links to a table in a SQL Server database. I

went through the wizard for creating a DataGridView. My problem now is that I cannot

add or update to the database. Though it gives me the form that I can use to input data,

it is never saved to the database.

Ironically, at the beginning of the process, it gives you options to add, delete and Update

from the View.

What more do I need to setup to get the application to be able to add and update data.


Question by:jonsuns7
    1 Comment
    LVL 83

    Accepted Solution

    You need to call the Update method on table adapter and it should save changes to the DB.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    730 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