How do you display, add, insert, and update a child table which has its fields displayed in text boxes on the same forum as the parent table?
I don’t want to use a datagrid for the child table. Everything is correctly bound to their respective tables. If I attempt to update the child table, it only works if I’m on the first record in the database.
EDIT:
I’m very new to ADO.NET. I just purchased a copy micorsoft ADO.NET core reference.
I have two tables, Log and Comments
Log:
logID
logDate
customerName
Comments:
commentsID
logID
comments
As you can see tbl Log and Comments have a one to many relationship. Although I treat it as a one to one, i.e. I only allow one comment per logID.
My forum navigation works fine. Comments are displayed for each logID record that holds a comment. The comments are placed in a multi-line textbox; not a datagrid. My only problem is UPDATE, INSERT, and DELETE. I can only perform these query types on the first record on the forum. If I navigate to the next record and attempt to update or insert a new record with comments, my changes are never saved to the database.
I don’t want to use a datagrid for the child table. Everything is correctly bound to their respective tables. If I attempt to update the child table, it only works if I’m on the first record in the database.
EDIT:
I’m very new to ADO.NET. I just purchased a copy micorsoft ADO.NET core reference.
I have two tables, Log and Comments
Log:
logID
logDate
customerName
Comments:
commentsID
logID
comments
As you can see tbl Log and Comments have a one to many relationship. Although I treat it as a one to one, i.e. I only allow one comment per logID.
My forum navigation works fine. Comments are displayed for each logID record that holds a comment. The comments are placed in a multi-line textbox; not a datagrid. My only problem is UPDATE, INSERT, and DELETE. I can only perform these query types on the first record on the forum. If I navigate to the next record and attempt to update or insert a new record with comments, my changes are never saved to the database.
Last edited: