Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem Editing tables w/ PKs and "No Duplicates"

Status
Not open for further replies.

caconner

Technical User
May 20, 2002
42
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top