473,396 Members | 1,833 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

When is a boolean not a boolean?

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"?

Nov 13 '05 #1
12 2018
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" <oi*@vinegar.com> wrote in message
news:W_******************@newsread2.news.pas.earth link.net...
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"?

Nov 13 '05 #2
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.

Nov 13 '05 #3
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.
Nov 13 '05 #4
also try <>0, 1, <>1 <>True <>False

"Salad" <oi*@vinegar.com> wrote in message
news:HI******************@newsread2.news.pas.earth link.net...
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.

Nov 13 '05 #5
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.


"Salad" <oi*@vinegar.com> wrote in message
news:HI******************@newsread2.news.pas.earth link.net...
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.



Nov 13 '05 #6
Salad <oi*@vinegar.com> wrote in message news:<W_******************@newsread2.news.pas.eart hlink.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
Nov 13 '05 #7
James Fortune wrote:
Salad <oi*@vinegar.com> wrote in message news:<W_******************@newsread2.news.pas.eart hlink.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


How would one do that?

Nov 13 '05 #8
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 <oi*@vinegar.com> wrote in message
news:9M*******************@newsread2.news.pas.eart hlink.net...

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


Nov 13 '05 #9
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?

Nov 13 '05 #10
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 <oi*@vinegar.com> wrote in message
news:3Q*******************@newsread2.news.pas.eart hlink.net...
Hi Don: Let me tell you how I do this. I could easily be doing
something wrong.

Nov 13 '05 #11
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.

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 <oi*@vinegar.com> wrote in message
news:3Q*******************@newsread2.news.pas.eart hlink.net...
Hi Don: Let me tell you how I do this. I could easily be doing
something wrong.



Nov 13 '05 #12
Salad <oi*@vinegar.com> wrote in message news:<Fa***************@newsread1.news.pas.earthli nk.net>...
James Fortune wrote:
Salad <oi*@vinegar.com> wrote in message news:<W_******************@newsread2.news.pas.eart hlink.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


How would one do that?


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
Nov 13 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Michael D. Reed | last post by:
I am using the help class to display a simple help file. I generated the help file using Word and saving it as a single page Web page (.mht extension). I show the help file with the following...
0
by: Alex | last post by:
my app was working fine in VB.NET 2003 (and framework 1.1). Now with VB.NET 2005 (framework 2.0) the uploading to an http server (ie. www.sharebigfile.com) stops with the error "The request was...
3
by: stuart.d.jones | last post by:
Hi, I have a DetailsView control bound to a SqlDataSource. I've got everything working nearly as I want, but here's my problem. I have a table which has a Guid as a Primary Key, and a VarChar...
2
by: Charles Law | last post by:
I have a complex object that I am serializing, and I would like to omit elements that have a default value. For example, if I have a class as follows Public Class Test Private m_Name As...
8
by: VB Programmer | last post by:
I would appreciate your assistance on this ASP.NET 2.0 site.... This is the wierd problem: While accessing the built in .NET functions for 'profiling' or 'membership' an error is generated (see...
3
by: eswanson | last post by:
I have a site that has multiple web site projects. I got it working on my windows xp sp2 computer in pre-compiled mode. I created a new site on a windows 2003 server and copied the pre-compiled...
1
by: GCeaser | last post by:
------- I have also posted this to the microsoft.public.xml group but I am not sure which one it belongs in ------ OK - I have an XML file from a vendor that uses a DTD files as follows: ...
2
ak1dnar
by: ak1dnar | last post by:
Hi, I am getting some sql errors when trying to insert a record to mysql table using asp.net application. Let me explain the scenario for your reference. This asp.net web form is executing...
4
by: confused1234 | last post by:
I get the error at the bottom of this post when i click on a linkbutton, javascript:__doPostBack('ctl00$Main$btnchangeemail','') The problem is intermitant, sometimes it works and sometimes...
0
by: aboutjav.com | last post by:
Hi, I need some help. I am getting this error after I complete the asp.net register control and click on the continue button. It crashed when it tries to get it calls this Profile property ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.