Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
More problems with the OleDb provider
Message
From
15/09/2006 02:27:31
 
 
To
14/09/2006 11:01:45
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01153726
Message ID:
01153970
Views:
16
>Sometimes, the OleDb provider returns error when there are not. For example, lets take a look at this following line:
>
>
>SELECT Master.Numero,Master.FirstName,Master.LastName,Master.Born,Master.Decease,Master.BornYear,Master.DeceaseYea,Master.NoSchool,
> Master.NoMaster,MasterType.Title_E,MasterType.Title_F,Master.WikiUrl_E,Master.WikiUrl_F,Master.WikiTitl_E,Master.WikiTitl_F,;
> IIF(ISNULL(MasterDefinition.Notes_E),"",MasterDefinition.Notes_E) AS Notes_E,;
> IIF(ISNULL(MasterDefinition.Notes_F),"",MasterDefinition.Notes_F) AS Notes_F,Master.Url;
> FROM Master;
> LEFT JOIN MasterDefinition ON Master.Numero=MasterDefinition.NoMaster AND MasterDefinition.NoMasterC=14;
> INNER JOIN MasterType ON Master.NoMasterT=MasterType.Numero;
> WHERE Master.Numero=41;
> ORDER BY Master.LastName,Master.FirstName
>
>
>This line executes well. But, sometimes, the OleDb provider reports:
>
>"Command contains unrecognized phrase/keyword."
>
>I really don't understand that one I would have to say.

"Master" is a reserved word in VFP, maybe in the provider as well.

For ease of reading and maintenance I'd recommend using local aliases e.g.
SELECT A.Numero, ...
FROM Master A ;
...
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform