About a small invoice application

mr_black_rose

New member
Joined
May 28, 2009
Messages
2
Programming Experience
Beginner
Hello! :)

Probably as many others, I'm trying (still in the process of trying) to finish simple vb.net application.
Well, I have a problem with this small application that I'm building and I can't solve it. I'm really annoyed of it, as I thought I read about this issue a lot, but it seems that I don't get it well enough.

So, the issue is as it follows:
- 3 tables in SQL, connected each other one to many. When I try to visualize them in the form, the first one is OK if it's in Details view, but the child (the second one) should be definitely in Datagridview, otherwise it doesn't work. Why? It doesn't make new records, it's not filtering, updating and etc. (I know that I have to make a stored procedure or make an query, that extracts all the records in a single table adapter or something like that, but I don't get it).

Can you please share experience about this, by sharing a printscreen or a simple sample presenting the connection between 3 tables - 1st one in Details View, 2nd one in Details View and 3rd one (which is connected to the 2nd) - in datagridview. I'll be really thankful!!! Something more: if the 1st table is in Details, the second in Datagrid and the 3rd in Datagrid, it works great. But why not 2 tables in Details view, 3rd in Datagrid.

Attached you will see this small application (sorry, it's in cyrillic)(printscreen), but first I made it with only 2 tables and it worked great (1 in Details view and the second in datagrid). I need 3 tables.
Untitled.jpg

Thank you in advance for every reply!
Regards
 
There's really no way we can answer that from the information provided. It's really very simple:

1. Use a DataAdapter or TableAdapter to populate a DataTable by calling Fill.
2. Bind the DataTable to a BindingSource and bind that to your control(s).
3. Use the same DataAdapter or TableAdapter to save the changes from the DataTable back to the database by calling Update.

The controls themselves are pretty much irrelevant, as long as they are bound to the BindingSource.
 
There's really no way we can answer that from the information provided. It's really very simple:

1. Use a DataAdapter or TableAdapter to populate a DataTable by calling Fill.
2. Bind the DataTable to a BindingSource and bind that to your control(s).
3. Use the same DataAdapter or TableAdapter to save the changes from the DataTable back to the database by calling Update.

The controls themselves are pretty much irrelevant, as long as they are bound to the BindingSource.


Thanks a lot! :)

Well, I'll try it, but even now I doubt that I'll manage to make it correctly. Thank you, anyway!
Good night!
 
Back
Top