Lost primary key

K

Kevin Witty

One of my tables has lost its primary key twice in the past 24 hours. The
key is still there, but it lost its designation as Primary. Took me a while
to figure out what happened (update queries suddenly stopped working), but
after I did I put it back, and a couple of hours later it was no longer the
primary again.

Needless to say, this is pretty spooky. (Access 2003, Jet 4 SP8 backend)
ANY idea what could have happened??!!
 
K

Kevin K. Sullivan

What type of table is this? (linked vs. local, Jet vs. ODBC, etc.)

How are you determining that the PK is gone? (Look in Access GUI, iterating
tabledef's indexes by name, iterating tabledef's indexes by primary
property)

How are you resetting the PK? (GUI, code)
 
K

Kevin Witty

It's a linked Jet table from an Access front end, and it just happened again.
I can tell when it happens when a form which has been fine for months
suddenly starts being not updateable. That now leads me to look at the back
end, and the table definition no longer shows Primary for what should be the
primary key. I then put it back again with the GUI, and it's fine... for a
while.

None of my queries EVER do anything with indexes.

Yoicks!
 
L

Lynn Trapp

Kevin,
This sounds really bizarre. I've never heard of a Primary Key index
disappearing on its own. That leads me to suspect some kind of corruption
that may only get worse.
 
K

Kevin Witty

Yeah, well sometimes bizarre 'r us. Shudda seen what Word did to me
yesterday with a table of contents!

I'm going to rebuild the table from scratch and see what happens. BTW, this
has happened on both the client's machine and my own.
 
L

Lynn Trapp

Yeah, well sometimes bizarre 'r us. Shudda seen what Word did to me
yesterday with a table of contents!


LOL... Word can do some really strange things.
I'm going to rebuild the table from scratch and see what happens. BTW, this
has happened on both the client's machine and my own.

If you are copying the database back and forth from yourself to the clients,
you may also be copying corruption back and forth -- assuming it is
corrupted.
 
D

Dirk Goldgar

Kevin Witty said:
It's a linked Jet table from an Access front end, and it just
happened again. I can tell when it happens when a form which has
been fine for months suddenly starts being not updateable. That now
leads me to look at the back end, and the table definition no longer
shows Primary for what should be the primary key. I then put it back
again with the GUI, and it's fine... for a while.

None of my queries EVER do anything with indexes.

I don't suppose anybody/anycode is running a make-table query on the
table in question in the back-end database?
 
K

Kevin Witty

No such luck. The primary key didn't disappear again on Friday, so I'm
waiting to see what happens Monday.
 

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