Records changing their unique ID

J

jason9118

I have a problem that is driving me nuts and I'm hoping some the
experienec professionals here can help. I have a database that is used
to keep track of students and their classes (in the database refered to
as orders for a couple of reasons) and the order's payments. I'm
nearing the end of design and starting to test it.

My problem is that at some random times a record in the "order" table
will jump to a different student's record in the "student" table and
take on that students unique id which I deservingly call "studentid".
Somtimes a payment in a "payment" table that is related to "order" as a
one to many relashonship will magically appear related to a diffeent
order with the orderid field changing by itself also.

I have been trying to track the problem for days and don't see anything
wrong with my relashonships and don't have any code that runs at
specific time that messes thing up. Also, after I enter the data it
looks fine in the tables and stays that way for a while.

If anyone knows what causes this behavior or similar problems please
advise. The DB is to large to attach here but I would be willing to
email it to anyone who would be kind enough to give me a hand. Thanks
in advace.
 
J

John Vinson

My problem is that at some random times a record in the "order" table
will jump to a different student's record in the "student" table and
take on that students unique id which I deservingly call "studentid".
Somtimes a payment in a "payment" table that is related to "order" as a
one to many relashonship will magically appear related to a diffeent
order with the orderid field changing by itself also.

What are the datatypes of the linking fields? How are they being
assigned? If you look at the data in the table datasheets, is the
numeric (I presume!?) value of the foreign key field actually
CHANGING, i.e. you store 3213 and look later and it's 3912?
 
B

Ben

How do you have the primary key(s) assigned for these
fields? I would recommend looking at your 'assignments'
again and trace the relationship path.

just a thought. hope it works out.
 

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

Top