Form Data Binding Confusion

Posted on 2009-04-24
Last Modified: 2012-05-06
I've got a similar issue to the question posed on EE here; but the resolution doesn't work with mine.

Basically I have a MSSQLCE database with a number of tables, which has been added to my vb 2005 project as a datasource, and I have created a standard form which has had the fields bound to the datasource by dragging and dropping from the datasource tab onto the form.  There is also a 'New' and a 'Save' button.

Clicking the 'New' button does the following:

I can then enter data onto the form and click the 'Save' button' to save the data, which does the following:

(There are actually more fields than specified in the Insert)

Now this works, but I would have thought one of the advantages of databinding was that I shouldn't have to specify every field that needs to be inserted and the code in the link above seems to back this up.

Any help would be appreciated.

Question by:nurcombe
    LVL 27

    Expert Comment

    No, you shouldn't need to do that.

    Check and make sure the controls are bound to the bindingsource.

    Right-Click on the textbox, select Properties.  In the Properties window, go to the top, expand "DataBindings" and make sure the Text property is bound to the BindingSource and field.

    Accepted Solution

    Found the problem, rather than

    I needed to have
        Me.ChannelsTableAdapter.Update(Me.MiV2DataSet, Channel)

    Many thanks for trying to help.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    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.

    Suggested Solutions

    Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
    Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    759 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

    11 Experts available now in Live!

    Get 1:1 Help Now