On Oct 03, 2006 8:56 PM, Jonathon Bevar wrote:
> Phil & Norman,
>
> Now Norman had a suggestion similar to yours:
>
> rs = App.PatientDB.SQLSelect("SELECT Count(PatientNumber) FROM
> Patients")
If what you want is just to check how many records are in the Patients
table, you can just use (like Phil suggested) the rs.RecordCount:
rs = App.PatientDB.SQLSelect("SELECT PatientNumber FROM Patients")
// Display error if one occurred
If App.PatientDB.Error Then
// Show error message
Return
End If
// Check how many records are on the table
If rs <> Nil AND rs.RecordCount >= 1 Then
MsgBox "The Personal Edition is limited to one bla bla bla"
rs.Close
Return
End If
// There's no records - insert a new one
(add code here to insert a new record)
Carlos
_______________________________________________
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>