Boolean in SQL with Paradox DB 
Author Message
 Boolean in SQL with Paradox DB

How can I access a Boolean datatype in a paradox table with SQL.
I Have tried

        WHERE FREDBOOL = 'T'
        WHERE FREDBOOL = 'TRUE'
        WHERE FREDBOOL = '1'



Tue, 16 Feb 1999 03:00:00 GMT  
 Boolean in SQL with Paradox DB


Davidson) says:

Quote:

>How can I access a Boolean datatype in a paradox table with SQL.
>I Have tried

>        WHERE FREDBOOL = 'T'
>        WHERE FREDBOOL = 'TRUE'
>        WHERE FREDBOOL = '1'

Example: partno = integer, cost = float, instock = boolean

Query1.SQL statement primed as follows:

        select partno, cost, instock from parts
        where instock = 'TRUE'

note that instock must be 'TRUE' to pickup record.

you can reference instock as follows in your code:

        Query1.Open
        FREDBOOL := Query1.Fields[0].AsBoolean

        or

        Query1.Open;
        FREDBOOL := Query1.FieldByname('instock').AsBoolean;

Cheers.. Bruce Caron



Tue, 16 Feb 1999 03:00:00 GMT  
 Boolean in SQL with Paradox DB


says:

Quote:


>Davidson) says:

>>How can I access a Boolean datatype in a paradox table with SQL.
>>I Have tried

>>        WHERE FREDBOOL = 'T'
>>        WHERE FREDBOOL = 'TRUE'
>>        WHERE FREDBOOL = '1'

>Example: partno = integer, cost = float, instock = boolean

>Query1.SQL statement primed as follows:

>        select partno, cost, instock from parts
>        where instock = 'TRUE'

>note that instock must be 'TRUE' to pickup record.

>you can reference instock as follows in your code:

>        Query1.Open
>        FREDBOOL := Query1.Fields[0].AsBoolean

>        or

>        Query1.Open;
>        FREDBOOL := Query1.FieldByname('instock').AsBoolean;

>Cheers.. Bruce Caron

OOPS: Mistake in first option. It should read as follows:

        Query1.Open;
        FREDBOOL := Query1.Fields[2].AsBoolean;



Tue, 16 Feb 1999 03:00:00 GMT  
 Boolean in SQL with Paradox DB

Quote:

> How can I access a Boolean datatype in a paradox table with SQL.
> I Have tried

>         WHERE FREDBOOL = 'T'
>         WHERE FREDBOOL = 'TRUE'
>         WHERE FREDBOOL = '1'

I guess you need to use quote delimiters, as this works fine -

select * from test
where BooleanField = "TRUE"

--
Mark.



Tue, 16 Feb 1999 03:00:00 GMT  
 Boolean in SQL with Paradox DB

Quote:

>Subject: Re: Boolean in SQL with Paradox DB

>>>        WHERE FREDBOOL = 'T'
>>>        WHERE FREDBOOL = 'TRUE'
>>>        WHERE FREDBOOL = '1'

In SQL, I believe you can also say where fredbool = true - no quotes.

-D



Sat, 20 Feb 1999 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. SQL and Date-Field in Paradox-Db

2. Paradox vs. SQL-db's

3. SQL-Typecasting to boolean ?

4. boolean in SQL

5. BDE, dBASE, SQL, and Logical fields (boolean)

6. Q - SQL / D2 / Paradox Tables / SQL Syntax question!!

7. OLE DB Provider for Paradox

8. Converting DBF to Paradox DB

9. Paradox DB In Use problem

10. Paradox DB

11. .WAV as BLOBs in Paradox tables - wav-db.txt [01/01]

12. from foxpro DBF to paradox DB

 

 
Powered by phpBB® Forum Software