Solved

Limit use of an Access database

Posted on 2013-02-04
6
280 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

911 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

21 Experts available now in Live!

Get 1:1 Help Now