MoveNext : "Key column information is insufficient or incorrect" error

Hi,

First of all, thanks for clicking and simply reading this post.

Have a form in vb.net that contains the following:-
- 1 classic Ado control(called ADODC14) bound to a TABLE(called Tbl_Variations)
- several Textboxes bound to different FIELDS within the TABLE  

The TABLE is in Access 2000 and contains :-
- zero - several records in the TABLE. (Depends upon situation)
- contains NO PRIMARY KEY (but each record has a guarenteed VARIATION NUMBER that is generated at runtime before a new record is added to the table.
 - Boolean (Yes/No) DataTypes fields bound to Textboxes. This simply populates the textboxes with True/False/"" depending if the field value is Ticked/Not Ticked/DBNull
- Text DataTypes fields bound to Textboxes

Want to move between RECORDS in the TABLE if several records exist.

Using Adodc14.Recordset.MoveNext , .MovePrevious to tranverse between records

This error happens sometimes upon MoveNext, MovePrevious, but fails upon transitions between CERTAIN records.

For Example:

TABLE contains several variation number (3,5,7,9,12,17)

MovePrevious works fine EVERYTIME going from 17 to 12
MovePrevious fails EVERYTIME going from 12 to 9 giving the error message
"Key column information is insufficient or incorrect. Too many rows were affected by update."

Anybody know why this is?? You thoughts would be most appreciated.

Stuart

StuartKAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RonaldBiemansCommented:
The reason you get this error is because you don't have a primary key, add a primary key to your table
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RonaldBiemansCommented:
Hi StuartK,

Is there a special reason you are using the "old" adodc instead of the new ado.net.

0
StuartKAuthor Commented:
Just found that out myself. Infact I came back to Delete the post before anybody answered. Guess I was too late!!

Thanks for letting us know Ronald.

It's Typical, I've been fighting with this for a couple of hours, and as I spend time to explain on EE, within 10minutes I've sorted myself.

Stu
0
StuartKAuthor Commented:
Hi Ronald,

Old classic Ado control.

We have 100+ forms that were converted over from VB6 and it did so by creating the classic ADO control in vb.net.

We have kept it that way until we can buy enough time to convert over to ADO.NET. That is our intention. A big job, and it'll involve changing the architecture of how the code works.

So in short it's a legacy of our old system at the moment.

Stuart
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.