🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.intrabuilder.data.bde
2 messages
2 total messages Started by Jason Cai Sun, 30 Aug 1998 00:00
default "false" value problem.
#112
Author: Jason Cai
Date: Sun, 30 Aug 1998 00:00
57 lines
2152 bytes
I use Intrabuilder + BDE4.5.

There is a problem with the default "false" value for the logical field
in dbase.

The default false value is x20 (" ")???
The assign false value is x46 ("F")
The assign true value is x54 ("T")

Try this script:
//////////////////////////////////////////
    Q = new Query();
     try
     {
       Q.sql = "DROP TABLE \"table1.dbf\"";
       Q.active = true;
       Q.active = false;
     }
     catch (Exception e)
     {
     }
     try
     {
       Q.sql = "DROP TABLE \"table2.dbf\"";
       Q.active = true;
       Q.active = false;
     }
     catch (Exception e)
     {
     }
     Q.sql = "CREATE TABLE \"table1.dbf\" (C CHARACTER(10), B1 BOOLEAN,
B2 BOOLEAN)";
     Q.active = true;
     Q.active = false;
     Q.sql = "CREATE TABLE \"table2.dbf\" (C CHARACTER(10), B1 BOOLEAN,
B2 BOOLEAN)";
     Q.active = true;
     Q.active = false;
     Q.sql = "INSERT INTO \"table1.dbf\" (C, B1) VALUES (\"TABLE1\",
FALSE)";
     Q.active = true;
     Q.active = false;
     Q.sql = "INSERT INTO \"table2.dbf\" (C, B2) VALUES (\"TABLE2\",
FALSE)";
     Q.active = true;
     Q.active = false;
     Q.sql = "SELECT A.C FROM \"table1.dbf\" AS A, \"table1.dbf\" AS B
WHERE A.B1 = B.B2 AND A.B2 = B.B2";
     Q.active = true;
     alert("You should see (one record) :" + Q.rowset.count());

/////////////////////////////////

Launch the designer and view the data in table1 and table2
The designer shows that the table1 contains the one record with the
following info "TABLE1", false, false     and table2 contains one record
with the following info "TABLE2", false, false.
Re: default "false" value problem.
#113
Author: Ken Mayer [TeamB]
Date: Mon, 31 Aug 1998 00:00
16 lines
946 bytes
Jason Cai <jcai@education.com> wrote:

>There is a problem with the default "false" value for the logical field
>in dbase.

This is as designed. If nothing gets touched in the logical field, the
default is null.

If you need it to be true or false, then set the value in the onAppend
event of the rowset ...

---
Ken Mayer [TeamB]
Golden Stag Productions
http://www.mindspring.com/~hirschv/homepage.htm
http://www.mindspring.com/~hirschv/dbase/dbase.htm
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads