The Linked Tables Manager can't tell the profile
EnsureLinks, Check or another method called without a profile raises wkeNotConfigured with
the message “No profile given, and the tables match no profile uniquely (DEV, TEST …).” In the
designer, the Profiles page says “The tables match no profile uniquely.”
Environment
WKL Forms Object Library with WklLinkManager, a configuration whose USysConnection names at least
one profile, in ACCDB or ACCDE files or the Access Runtime.
Cause
Without an Environment argument and without the Environment property, the link manager takes
the profile the tables are linked with now. It refuses to guess when that isn't clear:
- No configured table is linked yet (a new front end, or the links were deleted).
- The tables are linked half to one profile and half to another, for example after
Relinkof a single table, so two profiles match equally well. - The links point to sources that the configuration doesn't name for any profile (the configuration was changed after linking).
Linking to a guessed profile could connect a front end to production data, so the error is deliberate.
Resolution
- Name the profile at startup:
EnsureLinks "PROD", or setEnvironmentonce (links.Environment = "PROD") before you call methods without an argument. - To see what the tables are linked with, run
Checkwith each profile (Debug.Print links.Check("DEV").Count, links.Check("TEST").Count) or open the designer's Check and synchronize page. - Bring all tables to one profile with
EnsureLinks "<profile>"(or Refresh all in the designer); afterward, calls without a profile work again.
en/wiki/msaccess/comctl/troubleshooting/link-manager-cannot-tell-the-profile.txt · Last modified: by Wolfgang van der Stille