Self Modifying Code, Digital Certificates

I

Irarab

I created an application in MS Access using Pass Through Queries and
DNS free Logons to an ODBC MYSQL Database. I am modifying the QueryDef
to provide the parameters for my queries. I am also having the users
login at runtime and set the server, database, user and password pn the

fly for all linked tables abd pass through queries.


I figured out how to do everything. I have two problems:


1: Minor, I must put a copy of the application of each users computer
instead of allowing them to use a central copy on the server.


2. If I modify the pass-through queries using the QueryDef and modify
the login info, Microsoft puts up a nasty message telling the users a
virus had altered the program. I am signing the applications with a
Digital Certificate I generated myself using Selfcert. I cout set the
security to low but I do not want to do that.


Do you have any solutions to these problems. Is there a way to do this
without self-modifying the code, which is what I am doing. It seems
that there should be a better way of doing this but I have not found
anything.
 
I

Ira

I thought of something that I think will work.

I leave the Access MDB on the server in a read only directory.
I put a short cut to a batch file on each users desktop.
The batch file does the following:

1. Copies the Access MDB to the users local PC overwriting any one
already there
2. Start Access passing the name and location of the MDB file on the
command line

The MDB file is only about 3 MB after I compact and repair the
database, so it will not take much time to
be coppied across the network.

The file runs the first time but will not run again after it self
modifies itself unless I take the users out of sandbox mode.

Another advantage this has is I can put a new version out for the users
to use at any time. When I get a chance I will make the batch file
smarter and do the following:

1 If the MDB does not exist or the one on the server has a later date
then copy over the MDB from the server.
2 Make a second local copy of the MDB
3 Execute this second local copy.

I think this will solve all of my problems. Please tell me if there is
a better solution.

Thanks,

Ira
2 copy MDB from server.by checking the date and time of the so i will
copy over the file from the server the first time. Then
 
I

Ira

I thought of something that I think will work.

I leave the Access MDB on the server in a read only directory.
I put a short cut to a batch file on each users desktop.
The batch file does the following:

1. Copies the Access MDB to the users local PC overwriting any one
already there
2. Start Access passing the name and location of the MDB file on the
command line

The MDB file is only about 3 MB after I compact and repair the
database, so it will not take much time to
be coppied across the network.

The file runs the first time but will not run again after it self
modifies itself unless I take the users out of sandbox mode.

Another advantage this has is I can put a new version out for the users
to use at any time. When I get a chance I will make the batch file
smarter and do the following:

1 If the MDB does not exist or the one on the server has a later date
then copy over the MDB from the server.
2 Make a second local copy of the MDB
3 Execute this second local copy.

I think this will solve all of my problems. Please tell me if there is
a better solution.

Thanks,

Ira
2 copy MDB from server.by checking the date and time of the so i will
copy over the file from the server the first time. Then
 
T

TC

If your database is /not secured/, and the PCs can run VBScript, you
can forget the digital certificates, and use the AutomationSecurity
method. For more information, google this group for posts from me (TC),
containing that word.

HTH,
TC [MVP Access]
 
I

Irarab

It seems like a round about way of doing things though. The actual code
in the database gets altered so the security certificate is no longer
valid and in a multi user environment more than one user can not share
the same copy of the access database. The way it should have been set
up is that a temporary copy of the database is modified and the
original copy of the database does not get changed.

Thanks for all of your help.
 
T

TC

You'll find there is a much easier way of doing this in the next
version of Access :)

See if you can find any preliminary information on the "Office Trust
Center".

HTH,
TC [MVP Access]
 

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