I have "one-time" code in the new FE file that uses DAO to apply the necessary
changes to the BE table structures. I use that when the changes are relatively
few. When the changes are significant I copy the data from the old file as you
describe in your post.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
I version-number the data db by means of a custom property within that
db. Then, for each new version of the data db structure, I write a
seperate procedure which updates the previous db structure,
programatically, to the new one.
For example, if I had 3 released versions of the data db structure -
versions 1, 2 & 3 - I would have two seperate update procedures:
update_v1_to_v2, and update_v2_to_v3.
Each FE knows which version of the data db that it expects. (This is
coded-in to the FE.) So, the FE simply needs to do this, in its startup
code:
code db version = (whatever: hard coded)
get data db version
if code db version > data db version then
run each of the relevant update
procedures, in turn, to update the
data db structure to the version
required for this FE.
then update the data db version
number in the data db
endif
Thus, if you ran a v3 FE against a v1 or v2 BE, it would automagically
update the BE structure to v3. If you ran a v2 FE against a v1 BE, it
would automagically update the BE structure to v2, and so on.
HTH,
TC
It would seem that the only solution is to install a new file in the new
version format and then copy all the data form the previous verison using
queries that the underpreviliged clients can run.
Thanks
--
JB
(untested)
dim ws as workspace, db as database
set ws = dbengine.createworkspace ("", "SuperFred", "s3cr3t")
set db = ws.opendatabase ("full path toBE database")
I don't have Access here to check the parameters for the
CreateWorkspace() method. But essentially, it takes a valid user name &
password, and creates a workspace with the specified user's priviliges,
regardless of the priviliges of the currently logged on user. You can
do anything, via that workspace, that the specified user could do if he
logged on manually. By this means, a lowly priviliged user can be
permitted to perform highly priviliged operations, under program
control.
This is /not/ a security hole, because if the programmer knows a
suitable username & password (to place in the code), he could have
logged on with that username/password manually & done whatever he
wanted (within that user's permissions).
Naturally you'd want to be sure that the BE database was closed (not
open by other parts of your application) when you ran that code. You'd
also want to build the "secret" username & password from code, eg.
chr$(53) & chr$(45) & chr$(43) etc., so it wouldn't be visible in a
"displayable strings" scan of the mdb file.
As for the client app manager fiddling with the coded-in user, you'd
just have to tell him that that user is essential for proper operation
of the system & he should not fiddle with in. Indeed, you could check
that that user still existed (& was still a member of the Admins group)
on every system open, regardless of whether you needed to use him, or
not!
Or you could do all user/group maintenance via a form which controlled
exactly whay he could & could not do.
HTH,
TC