On Oct 03, 2006, at 1:55 PM, Jonathon Bevar wrote:

Phil & Norman,

Thanks for the info as I will take you advise on the Family edition limit of 5 as I was wondering what limit should I have put.

Now Norman had a suggestion similar to yours:

rs = App.PatientDB.SQLSelect("SELECT Count(PatientNumber) FROM
Patients")

Is this what you were thinking of?

If so how would I write the code, something like this?

Dim rsCheck, rsGen as RecordSet
// Check Patient Number if there is 1 patient currently
rsCheck = App.PatientDB.SQLSelect("SELECT Count(PatientNumber) FROM Patients")
   if rsCheck >= "00001" then
     beep
MsgBox"The Personal Edition is limited to one patient. Please purchase the Family or Professional Edition to handle more Patients."
     Exit
   end if


   Dim rsCheck as RecordSet

   // Check Patient Number if there is 1 patient currently
rsCheck = App.PatientDB.SQLSelect("SELECT Count(PatientNumber) FROM Patients")

if (rsCheck is nil) or rsCheck.EOF is true // nil is usually a result of a sql error, and an eof with THIS valid sql is bad
        // send Jonathon an error email !!!!!!!!
   else
if rsCheck.idxField91).IntegerValue >= 1 then // there's already one patient and they are trying to add another
             beep
MsgBox"The Personal Edition is limited to one patient. Please purchase the Family or Professional Edition to handle more Patients."
             Exit
        end if
   end if

   // no patients yet so add one


Would this work, I am jsut asking as I wont be able to work on this until later tonight, but thought I'd ask.

B.T.W. Do you think I should have 1 or 2 patient limit for the demo or Personal Edition? Just wondering. I think one as it is a "Personal Edition".

personal seems like it should be limited to 1 or maybe 2
_______________________________________________
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>

Reply via email to