Sql Update

Posted on 2011-10-14
Last Modified: 2013-11-26
Hi Experts

When I use the following code
           cmdBuilder = New SqlCommandBuilder(DA)
            DA.Update(DS, "Codes")

It doesnot update untill the programe END
What I like to do is Update then fill the DS with new setting and carry on working without going out of the form
I tried the following
           cmdBuilder = New SqlCommandBuilder(DA)
            DA.Update(DS, "Codes")
     'Fill DS
            DA.Fill(DS, "Codes")
            dt3 = DS.Tables("codes")
But it still have the old values. Unless I go out the form and debug again.
Please help
Question by:b001
    LVL 83

    Accepted Solution

    Try disposing the Adapter and the dataset and recreate the objects.
    LVL 6

    Expert Comment

    Try to add "DS.AcceptChanges()" after the "DA.Update(...)" line -

    It is not clear exactly what are your data processing requirements. Please attach a sample code (complete .NET project) and we will be able to assist you and provide you with modified code that solves the problem.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
    In my previous two articles we discussed Binary Serialization ( and XML Serialization ( In this article we will try to know more about SOAP (Simple Object Acces…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!

    754 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

    24 Experts available now in Live!

    Get 1:1 Help Now