Right now I'm doing:
Dim cur as VCursor, ValueExists as boolean
Cur = db.SQLSelect("SELECT field FROM table WHERE Field = 'something')
ValueExists = Cur <> NIL AND Cur.RecordCount > 0
I was wondering if the following would be faster:
Dim cur as VCursor, ValueExists as boolean
Cur = db.SQLSelect("SELECT Count(field) FROM table WHERE Field = 'something')
ValueExists = Cur <> NIL AND Cur.ULongField(1).Value <> 0
Also would that be he right way for that way of doing it? I am assuming here that a count is a ULongField. I am also assuming Cur.RecordCount can never be 0, as a count of 0 should still return a "record"
- karen
_______________________________________________ Valentina mailing list Valentina /AT/ lists D.OT macserve.net http://lists.macserve.net/mailman/listinfo/valentina
©2004 Karen |