Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weird MySQL Behavior
Message
 
To
15/02/2011 05:19:25
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MySQL
Application:
Desktop
Miscellaneous
Thread ID:
01500180
Message ID:
01500187
Views:
55
>Martina,
>
>- Check if table SUPPLIER contain field DESCRIPTOR
>- for string constants use '' instead ""
>- run the same SELECT in MySQL SQL Browse
>

>
>- Supplier contains the field DESCRIPTOR.
>- Do you mean use single quotes instead of double quotes? WHY?
Because MSSQL, MS ACCESS, MySQL, FireBird, PostgreSQL, Oracle, VFP use single quotes for string.

>- I ran this in MySQL Query Browser. It works. In VFP side, it will first display the error message I have shown, but continue on to display the correct results!

Hmm, try this version
SELECT A.REFNO, A.DATE, A.SUPPLIERID, A.TERMS, A.TOTQTY, A.AMOUNT, A.REMARKS,
     A.PREPAREDBY, A.CHECKEDBY, A.PRINTDATE, A.POSTDATE, A.CLOSED, A.CANCELLED, A.ID,
     B.CODE AS SUPPCODE, B.DESCRIPTOR AS SUPPNAME, B.ADDRESS AS SUPPADDR
FROM pohdr A JOIN SUPPLIER B ON A.SUPPLIERID=B.ID  WHERE B.`DESCRIPTOR` LIKE 'ABC%'
ORDER BY REFNO
MartinaJ

>
>Dennis
>
>
>
>
>>
>>SELECT A.REFNO, A.DATE, A.SUPPLIERID, A.TERMS, A.TOTQTY, A.AMOUNT, A.REMARKS,
>>     A.PREPAREDBY, A.CHECKEDBY, A.PRINTDATE, A.POSTDATE, A.CLOSED, A.CANCELLED, A.ID,
>>     B.CODE AS SUPPCODE, B.DESCRIPTOR AS SUPPNAME, B.ADDRESS AS SUPPADDR
>>FROM pohdr A JOIN SUPPLIER B ON A.SUPPLIERID=B.ID  WHERE B.DESCRIPTOR LIKE "ABC%"
>>ORDER BY REFNO
>>
>>
>>MartinaJ
>>
>>>Dear Experts,
>>>
>>>What is wrong with this SQL statement?
>>>
>>>SELECT A.REFNO, A.DATE, A.SUPPLIERID, A.TERMS, A.TOTQTY, A.AMOUNT, A.REMARKS,
>>>     A.PREPAREDBY, A.CHECKEDBY, A.PRINTDATE, A.POSTDATE, A.CLOSED, A.CANCELLED, A.ID,
>>>     B.CODE AS SUPPCODE, B.DESCRIPTOR AS SUPPNAME, B.ADDRESS AS SUPPADDR
>>>FROM pohdr A JOIN SUPPLIER B ON A.SUPPLIERID=B.ID  WHERE B.DESCRIPTOR LIKE "ABC%"
>>>ORDER BY REFNO
>>>
>>>
>>>If I placed exactly the same statement in MySQL Query Browser, it works. If I use it as my SelectCmd in a CursorAdapter, it generates this error, but gets the right result!
>>>
>>>Connectivity error: [MySQL][ODBC 3.51 Driver][mysqld-5.1.52-community]Unknown column 'B.DESCRIPTOR' in 'where clause'
>>>
>>>Help!
>>>
>>>Dennis
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform