Whenever I try to create a query involving an outer join and execute SQL with
the New Query wizard in the Server Explorer using an OLEDB Provider for
Visual FoxPro, I get an error of: 'Command contains unrecognized
phrase/keyword'.
This behavior occurs usin the following:
1. Create two FoxPro (.dbf) tables using Visual FoxPro 9.0. Add two columns
to table1 as: Recno integer, Name String. Add two columns to table 2 as
Recno integer, Type integer.
2. Using Visual Studio 2008, Create a connsction to the files using
Microsoft OLE DB Provider for Visual FoxPro
3. Populate the table rows as:
Table 1
Recno Name
1 First
2 Second
3 Third
4 Fourth
Table 2
Recno Type
2 3
4 4
4. Create a New Query selecting both tables, Check Recno and Name from
table1 and Type from table2 to be seleccted. Link Recno in table1 to Recno
in table2 and select All Rows from table 1 (outer join). Set a filter on Type
= 4.
5. Execute SQL.
This problem also existed in Visual Studio 2005.
What needs to be done to correct the SQL so it will work?
When will this problem be corrected?

Signature
Arlyn_L
Wen Yuan Wang [MSFT] - 25 Apr 2008 08:56 GMT
Hello Arlyn_L,
Thanks for your feedback. This is a known issue. Our product team has
noticed it and works on fixing in the next service package.
Let me summary the problem:
The query generated by VS IDE has {oj }. FoxPro VFPOledb.1 Provider cannot
recognize this keyword. Thereby, it throws an error when running the query.
This is an issue in VS Query Wizard. It's not enough smart to generate
outjoin query for VPF OLE Provider. Sorry for any inconvenience this may
have caused.
Eg:
SELECT table1.name, table2.recno AS Expr1, table2.type
FROM { oj table1 LEFT OUTER JOIN
table2 ON table1.recno = table2.recno }
To date, I would have to get rid of OJ and Curly brackets by ourselves if
you are designing Typed Dataset. After you removed "{oj }", the query will
works fine in your application.
Eg:
SELECT table1.name, table2.recno AS Expr1, table2.type
FROM table1 LEFT OUTER JOIN
table2 ON table1.recno = table2.recno
Hope this helps. Please don't hesitate to let us know if you have any more
concern. We really appreciate for your posting.
Improving the quality of our products and services is a never ending
process for Microsoft.
Thanks again for your understanding.
Best regards,
Wen Yuan
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.