Salad
Fri Jun 25 16:23:00 CDT 2004
Cindy Winegarden wrote:
> In news: RvZCc.13461$w07.7558@newsread2.news.pas.earthlink.net,
> Salad <oil@vinegar.com> wrote:
>
> Hi Salad,
>
>
>>Can you tell me where the link is on the Microsoft site to download
>>the
>>VFP ODBC driver?
>
>
> It's version 6.01.8629.01, available from
>
http://msdn.microsoft.com/vfoxpro/downloads/updates/default.aspx.
Thanks. Reading the warnings and MS tech-speak at that page I am
confused whether I should get it or not. I wish MS could make their
products work together.
>
>>Currently on the machine at the client site the driver is
>>v6.01.8629.01 dated 9/21/1999 for vbpodbc.dll. His is a Win98
>>machine.
It appears that is the version on my client machine that is causing me
problems. I just installed Access 2000 on my machine but the version I
have (see Ricks message) is v1.00.02.00 and comes with WinXP when WinXP
is installed. However, WinXP is telling me to get the more current
version. I guess I'll try that out. I'd hate for it to ruin my PC.
>>I am having a problem when I link using the old VFP driver. I have a
>>field called Active that is type Logical (boolean). If I query the
>>table it presents all records. However, if I filter it to all records
>>where Active is True/-1 or False/0 no records are returned. If I
>>create
>>a calculated field where I compare Active to True, those that are
>>true = -1 and those that are false = 0. However, if I attemp to
>>filter on that field again I get 0 records. So something must be
>>wrong with the ODBC driver on the client machine where the ODBC
>>freaks on logicals.
>
>
> Does this happen on both your machine and the client's machine?
If I can get the right ODBC driver I'll test it on my machine.
Can you post
> the SQL you are sending to the Fox tables?
OK.
*returns all records correctly
Select AckNum, Active From OrderLog
*the following 4 statements returns no records
Select AckNum, Active From OrderLog Where Active = 0
Select AckNum, Active From OrderLog Where Active = -1
Select AckNum, Active From OrderLog Where Active = True
Select AckNum, Active From OrderLog Where Active = False
*If the record is not active (0 or False), the Test
*column is -1 or True. If active (-1 or True) the Test column is False.
*IOW, it works as expected in the calced column Test
Select AckNum, Active, Active = 0 As Test From OrderLog
*If the record is active (-1 or True), the Test
*column is -1. If not active (0 or False) the Test column is False.
*IOW, it works as expected in the calced column Test
Select AckNum, Active, Active = -1 As Test From OrderLog
*However, if I set a criteria, it chockes too and returns 0 records.
Select AckNum, Active, Active = -1 As Test From OrderLog Where Test = -1
The ONLY way I have been able to get this to work is
Select AckNum, CInt(Active) As Test From OrderLog Where CInt(Test) = -1
This is WEIRD since in the above SQLs Active is equal to 0 or -1, it
computes that way, it just won't filter on it unless I SPECIFICALLY type
it as Type Integer. Perhaps I am saying filter on -1 but ODBC is
converting Active into some sort of Double like -1.000000000000001 so
they aren't equal.
What's also Weird is that if I say, from DOS
TYPE ORDERLOG.DBF
the values are T or F so that means the ODBC driver doesn't know how to
convert true or false values correctly. Unfortunately I don't know
anyone at MS that could tell me why their ODBC driver can't convert
boolean/logical values correctly.
In a way, I have a problem. My OS is WinXP, my client uses Win98. I
have A97 (A97s ISAM dll works fine) and Office2000 (can't get my VFP Dll
to work) and the client has VFP DLL 6.01.8629.01 that can't compute True
or False. If only I could trust MS to have a DLL that will work on my
machine or a program of theirs that can figure out the difference
between 0 and -1 I'd be a happy camper.
In FoxPro and Visual FoxPro a
> Logical field is represented in text as .T. or .F. . I'm not sure if Access
> successfully deals with transforming your "True" or -1 into the Logical
> value VFP is looking for. My test with True and False worked correctly and
> my test with 0 worked correctly, but I couldn't get "Yes" records with -1. I
> had to use 1 to get those.
>