Access Object IDs

G

Guest

Does anyone know if/how/when object IDs (from MSysObjects) change in MS
Access? In a table in my database, I reference Form and Report objects using
their object IDs, but I have noticed that the IDs seem to randomly change.
The database is not replicated and the forms have not been dropped and
recreated. I have not been able to reproduce this behavior by:

- Renaming the object;
- Modifying the object;
- Modifying multiple objects;
- Compacting and Repairing the database;
- Copying the DB to a new name.

Referencing the object by ID as opposed to name is preferable for all the
normal reasons. Any ideas?
 
A

Allen Browne

It will be interesting to see if anyone else has observed this.
Can't say I have, but neither have I tried to rely on these.

They could change if you create a new database, and imported everything. Is
this a possible explanation? This is the main reason why I never rely on the
object IDs: creating a new database and importing everything is a fairly
common rescue technique.

If that is not the case, do you have Name AutoCorrect enabled? Perhaps what
you are observing is this mis-feature confusing the names, rather than
genuine changes of name (though I don't know how MSysObject interacts with
Name AutoCorrupt.) Or, you might be onto one of the trails of how Name
AutoCorrupt actually destroys a database.
 
G

Guest

Thanks for the response Allen. It's a brand new database, so it isn't an
issue of recovery or reimporting objects. The first time I noticed that a
name had changed, I figured that perhaps I had just made a mistake when
selecting the ID. When it happened the second time, I compared the IDs with
those from a backup (a tape backup, as opposed to an Access backup) and they
were different. I'll keep on watching, but am hoping to get a response
(Microsoft, you there?) that can restore my confidence in using this field.
 
D

Dirk Goldgar

matarcallarse said:
Thanks for the response Allen. It's a brand new database, so it isn't
an issue of recovery or reimporting objects. The first time I noticed
that a name had changed, I figured that perhaps I had just made a
mistake when selecting the ID. When it happened the second time, I
compared the IDs with those from a backup (a tape backup, as opposed
to an Access backup) and they were different. I'll keep on watching,
but am hoping to get a response (Microsoft, you there?) that can
restore my confidence in using this field.

Unless you've created a support incident with Microsoft, I don't think
you're going to get a response from them. Microsoft personnel don't
regularly monitor these newsgroups, although if you have a certain kind
of relationship with them, I think they do guarantee you a response
within 72 hours (or something like that). However, they would probably
consider Allen's response to fulfill that obligation.

I believe that, if they were to respond, they would tell you you're not
supposed to write any code based on the structure of the MSysObjects
table, since that is intentionally hidden and not exposed as a public
interface. That's not much help for you, and I'm just guessing at their
response, but I wouldn't care to rely on the details of that table never
changing.
 

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