Solved

Limit use of an Access database

Posted on 2013-02-04
6
318 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 58
ID: 38852400
0
 
LVL 85
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 48

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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

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 48

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
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.
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…

688 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