On Aug 16, 2006 3:04 PM, Joseph wrote:
>
> I have a realSQL database that is populated, in part, with
> Boolean fields that obtain their value from checkboxes.
> When I query the whole database and fill a listbox with the
> string values everything looks fine.  The Boolean values are
> either true or false.  However if I put together a sql
> statement that tests for equality like so:
>
> theSQL="select * from casedata where referralstatus='true' "
>
> I don't get a database error but it finds nothing!
> HOWEVER, if I put the statement together like this:
>
> theSQL="select * from casedata where referralstatus<>'false' "
>
> It works perfectly.  Why is this so?!?  Obviously I have a
> solution but I'm puzzled nonetheless.

Check this post from Will Leshner about boolean values:
http://rbgazette.com/?p=346

>From his post, I couldn't understand how boolean values are stored on
the database when using the BooleanColumn of the DatabaseRecord Class:
if 1 and 0 or if true and false (or even True and False).

I would test by using 1 instead of true -OR- True instead of true to
see how it works.

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>

Reply via email to