Solved

Limit use of an Access database

Posted on 2013-02-04
6
292 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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

813 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

17 Experts available now in Live!

Get 1:1 Help Now