E
et
I have a detailsview that is populated according to the item selected in a
gridview. This works fine for updating the detailsview, but when I need to
add a record in the detailsview, it loses the connection, and the record is
saved with no related field id. For instance, the gridview contains a list
of orders. User selects on an item in the gridview, and the details view is
pouplated with all the products ordered according to the order selected,
something like "select * from ClientOrderDetails where ClientOrderID = @ID"
When I update a record, this is fine, as it modifies the record according to
the @ID, but when I attempt to insert a record, keeping the ClientOrderID =
@ID, it tells me there is no @ID parameter. How can I maintain this field
when inserting, or is there another way to grab that ID?
gridview. This works fine for updating the detailsview, but when I need to
add a record in the detailsview, it loses the connection, and the record is
saved with no related field id. For instance, the gridview contains a list
of orders. User selects on an item in the gridview, and the details view is
pouplated with all the products ordered according to the order selected,
something like "select * from ClientOrderDetails where ClientOrderID = @ID"
When I update a record, this is fine, as it modifies the record according to
the @ID, but when I attempt to insert a record, keeping the ClientOrderID =
@ID, it tells me there is no @ID parameter. How can I maintain this field
when inserting, or is there another way to grab that ID?