realbasic-nug
[Top] [All Lists]

REALSQLDatabase and Boolean values

To: RBNUG <realbasic-nug at lists dot realsoftware dot com>
Subject: REALSQLDatabase and Boolean values
From: "Dennis Birch" <dennisbirch at gmail dot com>
Date: Thu, 28 Jun 2007 22:01:26 -0700
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
What is the correct syntax for selecting records in a REALSQLDatabase
based on a field defined as a Boolean?

I have tried "SELECT myField FROM myTable WHERE myBooleanField = 0" // false
which works exactly as it should.

I have also succeeded with "SELECT myField FROM myTable WHERE
myBooleanField = 'True'"

But none of the following work:

"SELECT myField FROM myTable WHERE myBooleanField = 'False'"
"SELECT myField FROM myTable WHERE myBooleanField = 'false'"
"SELECT myField FROM myTable WHERE myBooleanField = 1"

I'm testing this on a table that has records that show either "True"
or "False" in my boolean field when I browse them. But when I try to
select them with any of the second set of SELECT statements above, I
get 0 records back. Am I doing something wrong, or does the
REALSQLdatabase have a wacky sense of humor about how to select
boolean values?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>