Forms Over Data Video Series - Two More Videos Released

Forms Over Data Video Series - Two More Videos Released

  • Comments 90

I just released two more videos (#15, #16) in the Forms Over Data video series. One is on understanding data binding and how it works from database all the way to the controls you see on forms. We talk about the relationship between the TableAdapter, the BindingSource and the DataSet and I show how to work with data in your code.

The second one explains how to update related data tables like I explained in this post. This video doesn't go into how to set up the transactions but you can read about how to do that here. I've also attached the code from the videos here.


Leave a Comment
  • Please add 1 and 2 and type the answer here:
  • Post
  • Dear Beth,

    I am new to and I have almost the same problem as posted by Nyein Htoo above. Basically, I have an order screen in which I have the Order header in detail format in the upper portion of the screen. In the lower half of the screen, I have the OrderDetail in datagridview with itemnumber, quantities, unit of measures, etc. However, what I couldn't make it work is I want is to show the item description next to the item number right after the user enters it. I modified the SELECT statement in the tableadapter to reflect the join with the item table. It tested fine in the execute button in the configure menu. However, it ran into problem as soon as I ran the application.

    Any help would be greatly appreciated. Thank you so much for the video series!

  • Hi Beth,

    I seen "Create a search form" (#4 of your video series). It's as great as the other videos.

    I want to use the code for two related tables in VB2008 (ie.: customer and orders). I set the relationship to "Both relation and foreign key constraint" and "Update" and "Delete" rules to cascade. In my form I show customer table in detail-mode and orders table in datagridview-mode.

    In "CustomerTableAdapter" I create, with QueryBuilder, a search query (similar to your lastname query) and I write the following code:

    Private Sub frmSearch_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    Me.CustomerOrdersDataSet.EnforceConstraints = False

           Me.CustomerTableAdapter.FillByLastName(Me.CustomerOrdersDataSet.customer, "D") 'Lastname with first letter = D


    Me.CustomerOrdersDataSet.EnforceConstraints = True

    End Sub

    Without "EnforceConstraints" debugger generate error. With previous code the "EnforceConstraints=false" don't rise error, but "EnforceConstraints=true" rise a Constraint Exception.

    So....I can't use your code for two tables (is it correct?). But, if I have two related tables, what's the correct way to obtain a search form?

    Thanks in advance,


  • Hello Mesi, I need code for Master-Details Windows Form In

  • Hi Marco,

    When EnforceConstraints is True this means that for every child row in the child table there must be a cooresponding parent row in the parent table. You need to make sure that if you are only pulling the "D" customers that you also are only pulling the orders for those customers. It looks like you are pulling all the orders and this will cause the constraints to fail.



  • Hi Mohammed,

    Take a look at this page for Winforms videos and associated code sample downloads:

    Specifically this one for Master-Details in VS 2008:



  • Hi Beth,

    Thank for your video series, and We need you to continue in it, because we need more and more.

    also if you show us how to we can make a look up table in datagrid view. i try to do that by using the drop down list and it work, but what if the look up table have a lot of data. especially now it have a delay when you click it to view.

    Best regards.

  • dear Beth,

    thank you very much for your video series, especially in forms over data. i've learned a lot especially in databinding.

    now, i'm beginning to create a simple application using vb 2005.

    i have a question for you.

    i have a two tables, ex.: student, registration

    in Student                   Registration

    StudentID                   RegistrationID

    LastName                   StudentID - foreign key

    Name                         Level

    i did fill in data in both tables (but some students didn't have a level, i leave it blank), and i also did bind them, like what you did in video #16 and it work just fine..

    now my question is this:

    how can i display a student without a level? is this possible displaying in the way of making a query?

    any help would be greatly appreciated..again thank you so much for the video series...a very big help to a beginner like me..

  • I want to learn Can you give the video about all of lesson

  • Hi G.K.M Piyangani,

    All of the Visual Basic videos are here:



  • i want a complete code of datagridview manupulation, and flex grid also, +923014112602

  • Beth:

    I had the same problem as Liju.  Something squashed the insert command in my table adapter.  I did exactly as you said and recreated the insert command.  For some strange reason, the query builder will not retain the full name of the table, i.e. [db].[owner].[table], so I'm the only one that can use the table.  Any ideas as to why?



  • Hey Beth massi, thank you a lot for the wondeful   information. Thanks a lot for all of them.

  • Hallo Beth,

    Thank you very much for your video's , you are the greatste.

    Really you do good work , and i am greatful so much for you.

    I Know that you have a littel time. but we need more tutorials, and make it against cost, but do make it expensive to us , take from me you have a fist customer.

    But Beth we need a tutorials the useful are for the markt , i mean how we can make invoice , how we can make a purchase order on vb net , you know some doucument which are used in the company world.

    Again you are the greatst. and i love so much


  • Hey Beth

    Can you please help me with code that inserts data in a child table that is on the next form in details view? And too, could you retrieve  last entered data (for example ID) from the primary table?


  • Beth, in How Do I: Get Started with the DataGridView, you do not show how you transform the EmployeeID column to combobox. And is important!

Page 6 of 6 (90 items) «23456