BindingNavigator and Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an access database dataset which a draggedonto a form which also put
the data navigator on the form. The problem is that when I ADD a new record
witht he add button, it gives me a primarykey that has already been used and
deleted before in the database. Then of course when you try to save it you
get an error because access won't allow this.

I do not undertand why this primarykey issue is happening? If I create a
new record in the access database itself, it operated correctly.

Any ideas?
 
In your dataset, if the primary key is an autonumber field, set the
autoincrement information to -1 so it doesn't generate a number you already
have. Then when it writes to the db, it will generate its own autonumber
field (assuming it is defined as such).

Robin S.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top