Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Edit an MDE? 2

Status
Not open for further replies.

vbainchicago

Technical User
Aug 7, 2003
102
0
0
US
I created an Access db for a small printing company. The final "product" I left them with was an mde file.

Everytime I do a database for someone I haven't worked with, I always include a module that will cause the db to "expire" after a certain date. For example:

Function Terminate()
If (Date >= #6/1/04#) Then
DoCmd.RunCommand acCmdExit
End If
End Function

I set every form's (including the form they see when they open the db)on load event to refernce this module.

Wouldn't you know, the company is stiffing me on the bill.

My question is - how can they defeat my expiration policy? I've only found way - roll the date back on the pc. They would have to know it was the date that triggered this event through, and I don't think they can figure this out.

Does anyone have any other ideas or practices they use to ensure that if someone doesn't pay your for your work that the databse will disbale itself?

I've set the terminate module in the past to delete tables instead of just exiting, but that was a little harsh.

Thanks for any feedback!
 
It is possible, but not without some external 'date cracker' program. As long as your code is compiled into an MDE, your app's code is secure from tampering at the Access db level.

So, I think you'll be getting a call from the company pretty soon. They'll either probably stop using the product (bad for you) or pay up (good for you).



I think this is the best I've ever read on the subject:

Nothing Access-specific, but if you're looking beyond a simple answer, read the thread.
 
i use a similiar thing as you with a couple of extra bits thrown in.
i use a field in a table to set the date value each time
the db is opened.I store the value as alpha numeric in
one of the tables that holds similiar data.Unless the user
knows about it it makes it that little bit harder for them,but not impossible
on opening the db i have a routine that checks the computers date against the stored date.If the computers date
is before the stored date that means the clock was wound back and i have a message that an error occurred and shut down the db.this routine is run from the switchboard form which i always have open(mainly invisible) ,and all my forms when opened reference the switchboard.No switchboard,exit db

i also use a system id,so if the computer id doesnt match the db shuts down
as i said its not impossible but it makes it difficult for my users not to pay,as
1.They need to know where the date value is stored
2.they need to know the alpha numeric date values
3.they cant open any form without the routine running
4.if they copy to a new machine the id numbers dont match.

 
Good suggestions - I'm going to implement them as well. I try and be fair with people, but if you don't pay....
 
I need help on setting a Date Expiration on my Application.
I wnat my app to expire after one (1) year.
I have tried the above code but can not get it to work for some reason. My app opens to a Formswitchboard.
Can someone give me moe details on exactly what to name the expressions, how to make the module, how to tie in the module, etc.?
Thanks
 
In the UK you can't do this. Whilst your customer is in breach of contract for not paying you, you are nevertheless liable for damage to their business if your software carries out deliberate actions to prevent them working.

A better option is to put up lots of warning messages "You haven't paid your bill - ring so and so immediately". That'll embarass them without giving them an excuse to sue you.

 
There have been companies in the past that have become insolvent after supplying such time limited software. This has left perfectly honest end users with a useless system and possible loss of data.

What is legitimate is the supply of a time limited "trial version" where the time limit is removed after receipt of payment and where the existence of the time limit in the trial version is disclosed up front. In that case failure to pay indicates the user did not like the software and does not mind expiry.

Also I would not generally buy software tied to a particular PC. I get to upgrade my PC too often for that to be viable.

 
Dear vbainchicago,

Whoa, be careful about deleting data, you might wide up with a user who did pay you and has somehow run one of your older versions that deletes tables. You would be in possible big trouble, potential law suit and the loss of a paying customer.

I just got stiffed yesterday.
I bid on a job, thru IT Moonlighter. I bid 2 days time, at a rate lower than my normal rate. After working for 3 days, I sent the mde to them. They informed me that someone else came in lower (They never closed the project) so, even thought they loved my solution, and approved the estimate, they said 'too bad'. well my app will stop working in a while, incase they do decide to use it.

Here are a couple of suggestions:
1) On the form 'Update' event, check the 'record count, and set cancel to true, when some date or total record count is reached.
2) Instead of deleting a table, just rename, or better yet, if it is a 'Linked' table, just delete the link.
3) I set my app to see if a special file, that I create when time expires, exists when the app first starts. I then do my date or counter validation and see if the app expired. When expired, I create a small file on the system when a certain 'Date' or counter is reached. Then, I check to see if the file exists, and if it does, I check a second date or counter (Always greater than the first) and if that is also exceeded, I quit the app after some type of message.

Now, if you use this 'file method, then create a small, offical looking file, deep in a windows directory. I might choose 'st001.dll' as an example and place it in the 'Windows\system' directory. That will make it very hard to find. Just make sure that the file name you choose does not exist.

Special note: Delete any of the items you use to limit the app when the customer pays. Also delete if/when you give them the source 'mdb'. Why, well if you give them a second app that uses the same logic, and they do not pay for that, they maybe able to figure out your logic.

Hope This Helps,
Hap [2thumbsup]


Access Developer [pc] Access based Add-on Solutions
Access Consultants forum
 
Hap

I read your post and also Beejay's above and liked the solutions you guys offered.

I'm kind of new to VB but learning that most things are possible.

What I've done is delievered a DB with some simple code that checks a date (Thread: thread181-795527). Simple, but it works. What I'd like to do and have started on, is develop something a little more "robust" using a combination of your code and Edski's.

I've developed a relatively simple DB that has a macro, that runs a query, that updates a table with today's date & Time. What I want to do is this (using code preferably):

1. Get the DB to check for a system file (DB may create this file in step 5). If file found - Exit.

2. Set the DB to expire on a given date.

3. Get the DB to check the last record in the table against the system's date and verify that the last record's date is earlier than the system date (if negative - code still executes but generates a system file simultaneously).
a. (It would be a bonus if I could encrypt or protect this table's data in some way)

4. Create a new entry in the table.

5. If answer to point 2 is negative, system file created.

Hope I've not bored anyone . . .



-----------------
Cogito Ergo Sum
-----------------
 
Dear Harlequin007,

One important point.

When ever you are creating some type of time or security check routine, do not label the module, table code or fields that might indicate some type of timer or date logic.

Normally, it is good programming practice to make code readable, but in this case, you do not want to provide any info to your user that the routine, any files or the functions do anything with security or expiration.

You might call the routine something like checkForFonts or PrinterSetupRoutine etc.

The less info you provide, the harder it will be to break.

And, remember to document, for yourself, but not in the source code, so you do not lock yourself out in the future.

Good Luck,
Hap...

Access Developer [pc] Access based Add-on Solutions
Access Consultants forum
 
Thanks Hap.

The DB I've released has a UniCode password which I doubt can be cracked without finding the source. Also, I have tried for years to find an MS Access password cracker to no avail. I can crack just about every other MS app, but not access.

On the point of ambiguously naming the code. I thought that and have done so.

Still, I would dearly love to close the loop on my message - do you think you could help a little...?


-----------------
Cogito Ergo Sum
-----------------
 
Guys.

I'm grateful for all your help and am looking at applying BeeJay's solution but as I'm a newbie don't know where to start. What I have is:

Table that gets a new entry every time the DB is run.
QRY that looks up the last value
I have code, but it is independant of this.

I need to know how to point the code at the query, but after checking the system date and compare the two.

Any suggestions guys...?


-----------------
Cogito Ergo Sum
-----------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top