DataGridView (With Relational Data)

DeltaWolf7

Well-known member
Joined
Jan 21, 2006
Messages
47
Programming Experience
Beginner
Hi,

If I create a form and add a datagridview object by dragging it from my datasource and having visualstudio create everything, if the database its coming from (mssqlexpress) has tables that are linked to each other it never saves the linked data from datagridview when i combine it with other eliments like text boxes, etc.

I hope that makes sense.

I will upload the poject if that helps anyone out.
 
Each DataGridView object is bound to a TableAdapter object, which stores all the required SELECT, INSERT, UPDATE, and DELETE statements that are automatically run when you load, insert, edit, or delete a record, respectively. VB.NET can automatically generate the queries with tables that only contain basic data types and have no relationships with other tables, but otherwise the only query it can automatically generate is SELECT.

Your best bet would be to create a procedure that edits a certain record, then call this procedure directly in a form that edits the data (rather than relying on the DataGridView control to display and edit data).
 
Back
Top