Creating a database for license generator

Hi all,

We were using a license generator application. It used to generate key for an T&A software. I had access to the application, I didn’t have access to the database. So, I created one. This post is about that.

Here are the list of files (dependencies), icon and the application for generating license. There was no database.

00 File List

It is clear that the there should be a database called ‘ValTimeLicense” in order for the software to work.

01 Database Settings

Upon opening LicenseApplication and entering details including vendor key (which can be obtained once the attendance software is installed), as expected I got an error “ValTimeLicense” database doesn’t exist. The solution lies inside the error (Create an empty database).

02 License Generator - Database Error

I created a database with the name ‘ValTimeLicense” and entered the details and clicked generate. There was another error, there were no tables in the database. Databases are useless without table(s).  The error meant there was no table named “LicenseMaster”.

03 License Generator - Table Error

I created a table with a temp variable with a random datatype to see what happens next.

04 Table with temp variable

Again, I entered the details and clicked on generate. There was one missing column “ProcessorID” on the table. Upon clicking OK, there were few more missing columns. “ReaderQty”, “EmployeesQty”, “ProcessorID”, “VolumeID”, “Expdate”

05 Processor ID Error06 Other Errors

There was list of column names, I was not sure on the datatypes. Upon checking the T&A Software (not the license generator) database and considered a table (employeemaster) in it, almost all the columns have varchar(max) datatype, [maybe a poor database design] and there were few columns with date datatype and few others.

07 Table from actual software

I figured out all the columns have varchar(max) datatype except “Expdate” which has date datatype. (I deleted temp column)

08 New Variables in table

Again I entered the details and clicked on Generate. Voila! I got the license key.

09 License Generator

Hope the technique used will help you, if you are facing any situations like the above.

Thanks for reading.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s