Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Open Table in ACCESS MDB for Read
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00657807
Message ID:
00658276
Views:
17
>The following SQL connection works
>
>SQLEXEC(gnConnHandle, 'SELECT COMPANY, POLICY FROM POLICY', 'accessquotes')
>
>However the join does not?
>
>SQLEXEC(gnConnHandle, 'SELECT P.COMPANY, P.POLICY, C.NAME FROM POLICY P, COMPANY C WHERE P.COMPANY=C.COMPANY', 'accessquotes')
>
>I am sure my table and column names are correct.

What ODBC error did you get? You can use AERROR() function to get it. I'm not familiar with ACCESS query syntax but you can try JOIN.
SQLEXEC(gnConnHandle, 'SELECT P.COMPANY, P.POLICY, C.NAME ' + ;
  'FROM POLICY P JOIN COMPANY C ON P.COMPANY=C.COMPANY', 'accessquotes')
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform