On Oct 03, 2006, at 1:40 AM, Jonathon Bevar wrote:
Norman,
Thanks for the advise but I found the code that does that main
adding of new Patients. Sorry as it's been over a year since I
last looked at the code.
Here is is:
// Generate a New Patient Number
rs = App.PatientDB.SQLSelect("SELECT MAX(PatientNumber) FROM
Patients")
if rs = nil then
beep
return
end if
patientNumber = Format(rs.IdxField(1).IntegerValue + 1, "00000")
Ok, I want to do this. I want to make three versions, a Lite or
Demo version, a Family version to have 25 members on it and a Pro
version with unlimited patients. I have a few hospitals asking
about a version for them but since I have the old version being
free with unlimited patients, they are not buying.
So a newer update with have 3 versions, Demo, Family and
Professional editions.
Is there a way to set the Patient database to only except 1 Patient
or 25 Patients. The unlimited one I have already.
I see.
There are several ways to limit it but they all involve making some
kind of change.
You could insert a before trigger, but anyone opening the database
with another tool could remove that trigger. You'd have to constantly
put it back.
The trigger could check to see how many records already exist and
reject new ones once they went over a certain number.
NOTE: I was thinking of having it come up with a mesage saying
"This is a DEMO edition, please purchase the Family or Professional
edition to handle more Patients.". And of course this "The Family
Edition can handle only 25 Patients, if this is not enough please
puchase the Professional edition to handle Unlimited Patients.".
I am now tried of giving my software away as RealBasic has jumped
in price and if they can get money for there software, why can't I?
The other is simply to insert some code and check before you try to
add a new record.
Something like
rs = App.PatientDB.SQLSelect("SELECT Count(PatientNumber) FROM
Patients")
This will give you how many patients already exist and you can use
that as a limit.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>