Solved

Limit use of an Access database

Posted on 2013-02-04
6
270 Views
Last Modified: 2013-02-05
I want to release a version of an Access database that I have designed, but only as a trial version. After the trial, the idea is that they will want to buy it. What is the best way to restrict its functionality?

I'm thinking of either only allowing a user to add, for example, 10 records to a key table, or preferably, issuing a code to the user once they have paid the money. In this case, I would need to restrict functionality in some way, then allow it to work after entering a code. Are there any other suggestions?
0
Comment
Question by:rick_danger
6 Comments
 
LVL 57
ID: 38852400
0
 
LVL 84
ID: 38852417
Or this:

http://www.ssware.com/cryptolicensing/cryptolicensing_ocx.htm

You can also "roll your own" to some extent, but if you are serious about selling a commercial solution you should invest in a quality licensing mechanism.

To "roll your own", you could do something like this:

1) On install of the database, write a registry key somewhere in an obscure location with the date/time of the install. Each time the db is opened check that registry key to determine if the trial period is up

2) If you want to do a "per use" sort of trail, then you could include a custom database property, and increment that property each time the app is opened. Also each time the app is opened, you would check that count. If the count > trials allowed then close the app

These are easily thwarted, of course (just keep moving back the system date for the first, and just readily available code on the internet to modify that custom property). More advanced licensing mechanisms stop these sorts of hacks, and are a lot more robust in terms of security.
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 38852466
1.  Only distribute mde or accde files.

2.  I generally create provide a fully functional application but set a database level property that limits the duration of the trial period, and a RegNumber

set prp = currentdb.CreateProperty("ValidThru", dbDate, #2/21/13#)
currentdb.properties.Append prp
set prp = currentdb.CreateProperty("RegNumber", dbText, "xyz123")
currentdb.properties.Append prp

I then check the value of the ValidThru property when the application loads the Splash form, and if the current date is after this date, I popup a form for them to enter a registration number.  If they enter the registration number, I change the ValidThru date.  Otherwise, I provide them a form to fill out and email or fax me to get the registration number, but do  not allow them to progress to the application until a valid registration number is entered.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:rick_danger
ID: 38854136
fyed - thanks for your reply. I think you are hinting at what I would see as a good solution. However, could you please be a little more explicit as I am not sure where to put these statements.
0
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
ID: 38854638
This falls into the Roll Your Own that LSM mentions above.

I do it in the splash form.  When that form opens, I check to see whether the ValidThru property exists, and if not, set it to 30 day from that days date.
Dim db as DAO.Database
set db = currentdb
If PropertyExists("ValidThru") = False Then
    set prp = db.CreateProperty("ValidThru", dbDate, Date() + 30)
    db.properties.Append prp
    set prp = db.CreateProperty("RegNumber", dbText, "xyz123")
    db.properties.Append prp
    set prp = db.CreateProperty("Registration", dbText, "")
    db.properties.Append prp
Elseif db.Properties("ValidThru") < Date() AND db.Properties("RegNumber") <> db.Properties("Registration") Then
    docmd.openform "frm_Registration",,,,,acDialog
    if db.Properties("Registration") <> db.Properties("RegNum") Then
        Application.Quit
    End If
End If

Open in new window

The function PropertyExists simply checks the current database properties to see whether that property already exists; it looks like:
Public Function PropertyExists(PropName As String) As Boolean

    Dim intPropType As Integer
    
    On Error Resume Next
    intPropType = CurrentDb.Properties(PropName).Type
    PropertyExists = (Err.Number = 0)
    
End Function

Open in new window

As LSM indicated, an experienced developer can figure out a way to thwart this security but most users are not sophisticated enough to bypass even this rudimentary security.  However, using this technique, there is nothing to prevent the user from simply downloading another copy, and starting all over.  

If the application contains a backend database I will store those properties in the backend rather than the front end, which will cause a few more headaches for someone trying to bypass the review period.

Another option is to write those values to the registry (although that is editable as well) or to a text file in an obscure folder on the users hard drive, and check to see whether that file exists.
0
 

Author Closing Comment

by:rick_danger
ID: 38854657
Excellent clarity, thanks!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now