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. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user