Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2004
    Posts
    173

    Unanswered: Versions of Access and Type Libraries

    I have developed for some time in Access 2K and things have worked well, but now some of the users I have are getting Access 2003 with their new computers, and this has caused a problem. The problem is that when I move an ap to that machine the code borks when it hits, say a reference to Excel 9.0 rather than a referece to Excel 10.0. How is this best resolved? Can you check the references when the ap loads via an auto exec macro? Any help appreciated. Thanks.

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    yes-ish and no-ish.

    you can't switch references in .MDE, but in .MDB you can (i have an example of referencing DAO from GUID in the sticky-code-bank. the same process works for most references)

    so if you are in a mixed environment AND distributing .MDE (BTW the only sane approach) you are 'doomed' to use late-binding (there is some discussion from pootle in the sticky on late binding (and in reality there is no material speed difference)) or to recompile the .MDE for each environment

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    WTF?
    the sticky code bank got abducted by martians???????
    currently using SS 2008R2

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    bahhhhhh!
    since someone is messing around, try hitting here

    izy
    currently using SS 2008R2

  5. #5
    Join Date
    Apr 2004
    Posts
    173
    Thanks for the link. I will check this out. Oddly enough I have the app as a .mdb. This is subject to change though. I've been lucky that my users are not of the malicious sort and generally giving them an interface that appears that they can't screw with is enough.

    The late binding bit sounds like the way to go, and I will check this out. Thanks for the speedy help.

  6. #6
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    if you continue with MDB you can automate dropping of all external reference and re-reference from GUID on startup.

    you probably don't keep GUIDs in your head, so a good way to find them is to reference everything you might need and run (works in DAO, only guessing in ADO):

    Dim ref As Reference
    For Each ref In References
    Debug.Print "Name: ", ref.Name
    Debug.Print ref.GUID
    Next ref

    add Waynes totally magical version 0, 0 into the mix and you are done
    (the magic is that .addfromguid normally requires the version (so it only takes you back to where you started) but using version 0.0 pulls the most recent version from the client machine automagically)

    izy
    currently using SS 2008R2

  7. #7
    Join Date
    Apr 2004
    Posts
    173
    As an aside, and a possible need to repost - if my users aren't the malicious sort am I missing the boat not moving to an .mde.

    Am I dooming myself to failure with that strategy and the unnecessary and time consuming recoding of a bunch of stuff if I don't move things in that direction. And while I'm at it what is the answer to life the universe and everything.

  8. #8
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    tough question!

    rewriting stuff that works for you and didn't yet get broken by your golden users is probably not worth the effort. you don't even need auto-referencing code if you can walk your users through Alt-F11/Tools/References on the phone. it's true that MDE is smaller and faster, but saving a few milliseconds and a megabyte here or there is not comparable with a lottery win.

    i have a few truly awful users! if it is breakable, they break it. if there is one config that wont work, they have that config. if all Outlook installations have a default deleted folder, theirs doesn't.

    these same few users are congenitally disabled from describing error symptoms accurately and are totally convinced that they can resolve their own problems by poking around in anything left open (which is how their setups get into such a mess).

    these few users lead me to my paranoid coding style. self-locking MDE only. usys tables. late-bind everything (except DAO). check paths in startup. relink backend in startup. minutely detailed log of every aspect of startup. backend files that record attempts to open them and then auto-exit. blah blah blah.

    the more paranoia i put in my code, the less calls i get.
    currently using SS 2008R2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •