Undocumented(?) MS Access 97's version control properties and related bug(s)


Question

Does MS Access 97 have any version control properties "burnt into" mdb/mde ?

Answer

I think that MS Access 97 DOES have undocumented (unexposed) version control properties. Here are the actions which prove that fact:

- Create MDB file and name it lib.mdb
- Create module named basHelloWorld in it
- Insert the following function into it:

Public Function HelloWorld()
MsgBox "Hello, World !"
End Function

- Close module basHelloWorld
- Close lib.mdb
- Create another MDB file and name it sb.mdb
- Create module named basSB in it
- Insert the following function into it:

Public Function HW()
HelloWorld
End Function

- Set reference to lib.mdb (Tools -> References -> [Browse...] ...)
- Close module basSB
- Create macro named Autoexec with Action = RunCode and Function
Name = HW()
- Close macro Autoexec
- Close sb.mdb
- Make mde-file lib.mde from lib.mdb
- Rename lib.mdb to lib_src.mdb
- Rename lib.mde to lib.mdb
- Make mde-file sb.mde from sb.mdb
- Rename sb.mdb to sb_src.mdb
- Rename sb.mde to sb.mdb
- Open sb.mdb
- You'll see message box - "Hello, World !"
- So far so good...
- Close sb.mdb
- Copy lib_src.mdb to lib.mdb replacing current lib.mdb (here you replace
compiled version of lib.mdb with source version of lib.mdb)
- Compile lib.mdb to lib.mde
- Rename lib.mde to lib.mdb
- Open again sb.mdb
- You'll see a message box:

"The expression you entered has a function name that Microsoft Access can't find"

- Click [OK]
- Click [Halt]
- Select Autoexec macro in database window
- Click [Run]
- You'll see message box - "Hello, World !"
- MS Access 97 resolved function reference with new version of compiled Mdb and works OK now.
- Close sb.mdb
- Copy lib_src.mdb to lib.mdb replacing current lib.mdb (here you again replace compiled version of lib.mdb with source version of lib.mdb)
- Open again sb.mdb
- You'll see a message box:

"The expression you entered has a function name that Microsoft Access can't find"

- Click [OK]
- Click [Halt]
- Select Autoexec macro in database window
- Click [Run]

- And now - do you see that?:

An application error has occurred and an application error log is being generated.

MSACCESS.EXE
Exception: access violation (0xc0000005),Address: 0x65182a15

- Is this a bug?

Note:

Yes, of course, I shouldn't replace compiled version with source one, but the problem isn't in this special case when I specially did mistake - the problems are:

1. MS Access 97 crashes when *I* did mistake - not a big problem - I know why it crashes
2. MS Access 97 has(?) undocumented features (properties) which I'm desperately looking for - version major, minor and revision in compiled MDBs and probably GUID (CLSID?) - when you replace compiled library mdb with new version of compiled mdb you get "The expression you entered has a function  name that Microsoft Access can't find" on first call to any function in this library but the second etc. calls work OK - it meens for me that MS Access resolves references on-the-fly after first call failure - but why then it cannot resolve function reference properly on first call? What disturbs it to do that? - This is a main question. Probably I can set somehow (inform MS Access 97) that the mde-libs versions under  development are compatible?

BTW - I know some workarounds but they are tricky and I'm not sure they are 100% bullet-proof...


Copyright 1999-2008 by Shamil Salakhetdinov. Original version is published All rights reserved.