Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

When is a boolean not a boolean?

5 views
Skip to first unread message

Salad

unread,
Jun 24, 2004, 1:52:54 AM6/24/04
to
I have a strange one that's making me scratch my head.

The app is written in AccessXP. The table is a FoxPro 2.6 table. I
link to it via ODBC. There is a field called Active, type Logical
(boolean) in FoxPro.

I have a query where I select OrderID and Active. It presents the
records fine.

If I enter False or True for the criteria of Active, no records are
returned.

If I create an expression like
Expr1:[Active] = 0
or
Expr1:[Active] = -1
the results in that column are 0 or -1 depending on whether or not
Active is true or false as I would expect. Yet if I put in True or
False in the expression's Criteria row no records are returned.

Is this an ODBC problem? Although the 0 or -1 appear to be numbers is
it possible it considers the value of Active as a string or a double or
some other thing?

What confounds me is that it works fine in A97....but A97 doesn't use
the ODBC for FoxPro tables...it uses some Isam drivers.

Do you have any suggestions for debugging this "feature"?

Reggie

unread,
Jun 24, 2004, 3:34:55 AM6/24/04
to
Salad, Don't know the answer to your question, but have you tried using 0
or -1 as the criteria in the query? Just wondering!

--
Reggie

----------
"Salad" <o...@vinegar.com> wrote in message
news:W_tCc.12080$w07....@newsread2.news.pas.earthlink.net...

Salad

unread,
Jun 24, 2004, 4:58:15 AM6/24/04
to
Reggie wrote:
> Salad, Don't know the answer to your question, but have you tried using 0
> or -1 as the criteria in the query? Just wondering!
>
Yes. I tried that, same results. As long as I don't have a WHere
clause I get records. If I try to filter on True/False or 0,-1 there
are no records returned.

Salad

unread,
Jun 24, 2004, 4:50:30 PM6/24/04
to
Reggie wrote:
> Salad, Don't know the answer to your question, but have you tried using 0
> or -1 as the criteria in the query? Just wondering!
>

Hmmm...I entered
Expr1 : CInt([Active])
and in the criteria row True or False and I get records. This seems odd
since I have entered
Expr2 : [Active] = True
and depending on whether or not Active is True or False I get 0 or -1
and the values are correct.


david epsom dot com dot au

unread,
Jun 25, 2004, 3:49:34 AM6/25/04
to
also try <>0, 1, <>1 <>True <>False

"Salad" <o...@vinegar.com> wrote in message

news:HIwCc.12136$w07....@newsread2.news.pas.earthlink.net...

Salad

unread,
Jun 25, 2004, 10:36:53 AM6/25/04
to
david epsom dot com dot au wrote:
> also try <>0, 1, <>1 <>True <>False

Yeah. I tried that. I tried all varieties of methods on it. It is
interesting. I created a new table with 4 or 5 records and it worked
fine. But if I open the FoxPro table I am having trouble with and copy
the field OrderID and Active to a new table and index on OrderID, this
table has about 58K records and Access bombs on understanding the
boolean field.

What blows me away is that if I enter
Expr1 : CInt(Active)
then it works. Now why would that make a difference when if I enter
Expr2 : [Active] = 0
and if Active is False, Expr2 is -1 and 0 if Active is True?

This tells me that my ODBC driver is braindead. That MS can't make ODBC
work with its own products.

Since I am using AccessXP for this I looked at the version of the FoxPro
VFP OCBC driver I am using. It is dated 9/21/1999 and is version
6.01.8629.01. It's quite possible this driver is old, unsupported, is
not backward compatable, and that AccessXP being more modern is
reading/using it and gets confused and burps.

Hopefully I can find a VFP ODBC driver at Microsoft. I'm not sure if MS
uses ODBC anymore or where they would have it on their site. With my
luck I'll get a newer ODBC driver that AccessXP doesn't recognize and
burps again.

James Fortune

unread,
Jun 25, 2004, 2:27:21 PM6/25/04
to
Salad <o...@vinegar.com> wrote in message news:<W_tCc.12080$w07....@newsread2.news.pas.earthlink.net>...

> I have a strange one that's making me scratch my head.
> ...

> What confounds me is that it works fine in A97....but A97 doesn't use
> the ODBC for FoxPro tables...it uses some Isam drivers.
>
> Do you have any suggestions for debugging this "feature"?

You could force the dll used in A97 for the Isam drivers to be used in AXP ;-).

James A. Fortune

Salad

unread,
Jun 25, 2004, 3:38:13 PM6/25/04
to
James Fortune wrote:

How would one do that?

Don Leverton

unread,
Jun 25, 2004, 5:07:28 PM6/25/04
to
Hi "Salad",

These are just random thoughts, as I have never personally encountered this.

Have you looked in the OBDC / OBDC32 section of the Control Panel?
That may provide you with some insight as to what you're missing, or don't
have configured perhaps?
Don

Salad <o...@vinegar.com> wrote in message

news:9MWCc.13292$w07....@newsread2.news.pas.earthlink.net...

Salad

unread,
Jun 26, 2004, 1:59:27 PM6/26/04
to
Don Leverton wrote:
> Hi "Salad",
>
> These are just random thoughts, as I have never personally encountered this.
>
> Have you looked in the OBDC / OBDC32 section of the Control Panel?
> That may provide you with some insight as to what you're missing, or don't
> have configured perhaps?
> Don

Hi Don: Let me tell you how I do this. I could easily be doing
something wrong. Opening my links on my development machine are
atrociously slow. I have a 2.6 gz machine, 1 gig memory, lots of disk
space, Access2000 has sp3 installed.

I get the ODBC administrator open. I click System DSN. I click Add. I
then select the VFP driver and click Finish. I enter Test for both
Data Services name and description. I select FreeTable, not DBC (VFP
can be a DBC or use dbf tables) and enter the path C:\Test as the path.
I click Options; machine collate. The Null, Deleted, and Fetch data
in background (defaults) are checked. I click Finish. This is real quick.

I have a customer table with 167 records. I open up Access2000, click
File/GetExternalData/Link, select ODBC, select Test dsn. After about 5
seconds (slow) the tables in that directory appear. I select Customer.
After 5-10 seconds it presents me with a list of fields that make the
unique index key. I select CustomerID and OK. I now have a link.

When I click on the customer table and press Open in A2K it takes about
1 minutes 15 seconds to open it. I have AutoCorrect set off.

I'm wondering at this point if I can even work on this application. On
my clients machine it is not as slow as mine. It takes about 1-3
seconds to open the customer file and maybe 5-10 to open the orderlog
file. I have not even attemped to open it on my machine as it has 58K
records.

If I open up the customer table the primary key is type decimal. What I
find intriguing is that ALL text fields are set to Required = Yes, Allow
zero length = Yes.

I imported the data instead of linked to it and pulling up the records
is instantaneous....as expected. I'm pulling my hair out on this
on...what little hair I have. If I use A97 and the ISAM driver, pulling
up the tables is instantaneous.

Can you see anything that I am doing wrong?

Don Leverton

unread,
Jun 26, 2004, 3:27:04 PM6/26/04
to
Hi,

Like I said, I really don't know a whole bunch about this.
My suggestion was to have a look at the OBDC applet in the control panel to
see what information could be gleaned.

There is a whole lot of information presented there, i.e driver versions and
dates, etc.

I'm at work right now, where we have 2 networked PC's. One of them has
Win98SE and the other is running WinXP.

Win98: Control Panel / ODBC Data Sources (32bit)
WinXP: Control Panel / Admin Tools / Data Sources (ODBC)

Just for an example, in comparing the two I see that the W98 machine uses:
M/S VFP driver, ver 6.00.8428.00, vfpodbc.dll, 04/06/1999

and the XP machine uses:
M/S VFP driver, ver 1.00.02.00, vfpodbc.dll, 08/28/2002

I don't know what the significance of the difference between the 2 is
however ...
My thought was that you could get this kind of information, and use it to
research your problem further.

Best of luck with that, BTW.
Don

Salad <o...@vinegar.com> wrote in message

news:3QiDc.14601$w07....@newsread2.news.pas.earthlink.net...

Salad

unread,
Jun 26, 2004, 9:12:53 PM6/26/04
to
Don Leverton wrote:
> Hi,
>
> Like I said, I really don't know a whole bunch about this.
> My suggestion was to have a look at the OBDC applet in the control panel to
> see what information could be gleaned.
>
> There is a whole lot of information presented there, i.e driver versions and
> dates, etc.
>
> I'm at work right now, where we have 2 networked PC's. One of them has
> Win98SE and the other is running WinXP.
>
> Win98: Control Panel / ODBC Data Sources (32bit)
> WinXP: Control Panel / Admin Tools / Data Sources (ODBC)
>
> Just for an example, in comparing the two I see that the W98 machine uses:
> M/S VFP driver, ver 6.00.8428.00, vfpodbc.dll, 04/06/1999
>
> and the XP machine uses:
> M/S VFP driver, ver 1.00.02.00, vfpodbc.dll, 08/28/2002

Thanks Don. I had the same driver, 1.00.02.00, on my MS VFP driver. It
wouldn't allow me to create a User/system dsn...it told me to go to go
to the Microsoft site and download the most current one...which I did is
is v8.01.8629.01 dated 12/7/1999. I can at least create a dsn but it is
so slow as to be what I consider worthless.

I have a mantra I repeat every so often: Microsoft giveth and Microsoft
taketh away. The ISAM driver in A97 was great. So of course that has
to be removed so as to give developers a piece of crud using an ODBC
driver. Sorry for the rant, guess I'm frustrated.

James Fortune

unread,
Jun 27, 2004, 3:56:11 PM6/27/04
to
Salad <o...@vinegar.com> wrote in message news:<Fa%Cc.785$lh4...@newsread1.news.pas.earthlink.net>...

I encountered this situation when A97 was used to link to FoxPro
tables and the company upgraded to A2K. A2K dropped the Isam
capability to link the FoxPro tables so I simply found the dll in A97
that did the Isam. I either replaced the dll or added the dll to A2K
and was able to link the FoxPro tables again. I don't know if this
would work in AXP.

James A. Fortune

0 new messages