Solved

Limit use of an Access database

Posted on 2013-02-04
6
314 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

732 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