[Gambas-user] No return value (18)
Bruce
bbruen at ...2308...
Mon Jun 25 10:53:42 CEST 2012
Every day seems to be Friday the 13th at the moment!
Every so often, I manage to write a Property that has "No return value".
(It's always a case of something I have done, so it's not a gambas
problem.)
Today, I have done it again and I can't work out what it is that's
wrong.
In class Meeting
Property Read KnownMeeting as Boolean
...
Private Function KnownMeeting_Read() As Boolean
'==============================================
' Returns a quick check as to whether the meeting already exists
' on the database.
Dim m As New Meeting
If m.Exists([$trackcode, Format($racedate, "yymmdd")]) Then
Return True
Else
Return False
Endif
Catch
Error Subst("&1\nERR: ... blah blah blah, never happens.
End
(The Meeting class is a database interface in a library. The
Meeting.Exists([pkey]) As Boolean is a method that just checks for the
existence of the primary key in the pk index tables.*)
For the life of me I cannot see what I have done wrong here!
Any suggestions?
Bruce
* For those that are interested, depending on the table size in terms of
rows and complexity in terms of columns/column types and the proper use
of index regeneration doing things this way can be of the order of 300+
times faster than loading the record itself. Proven in both postgresql
and (yuck) mysql.
In postgresql it Exec's "SELECT EXISTS(Select 1 from &1 where &2) AS
ind" where &1 is the table and &2 is the pkey values. I have forgotten
the equivalent in mysql.
More information about the User
mailing list