I have several tables in a database with relationships set up based upon the Northwinds Ordering database. There are primary keys and "no duplicates" set on 1 field for each table.
Within my VB application I'm allowing the user to edit existing records. I'm using an ADO connection and SQL statement to locate the record. I then set the fields equal to the textboxes upon clicking the Save button. Finally I use the update method on the recordset. The problem I'm struggling with is that because of the indexing and primary keys, I get an error message when I try to save the edited info to the table. I'm not using the bookmark method, but am begining to think that may be the root of the problem. I beleive it's trying to create a new record instead of changing the existing record. If I delete the key and relationships, it adds a new record.
Can anyone help? If it is the bookmark method, how do I use it? I have a few VB books. but none address this issue
Within my VB application I'm allowing the user to edit existing records. I'm using an ADO connection and SQL statement to locate the record. I then set the fields equal to the textboxes upon clicking the Save button. Finally I use the update method on the recordset. The problem I'm struggling with is that because of the indexing and primary keys, I get an error message when I try to save the edited info to the table. I'm not using the bookmark method, but am begining to think that may be the root of the problem. I beleive it's trying to create a new record instead of changing the existing record. If I delete the key and relationships, it adds a new record.
Can anyone help? If it is the bookmark method, how do I use it? I have a few VB books. but none address this issue