Hi!
I do not know if this would help...
Well, VFP have limitation for code line in 256 characters for a SINGLE LINE of code. So, qhen you write all SELECT statement in a single line of code, it would not work probably. Try to use semicolon and line bvreaks to separate SELECT statement to lines, in other words:
cSQL = "SELECT ...
;" + CHR(13) + CHR(10) + ;
"FROM ...
; " + CHR(13) + CHR(10) + ;
...
HTH
>Hi All.
>I'm trying to use Visual Basic and Visual C++ (both 6) with ADO to Query a VFP database, usually this works fine and I'm happy with the results, except when the SQL statement is long (256 characters or over) I recieve the error
>
>[Run-time error '-2147217900 (80040e14)' Command contains unrecognized phrase/keyword]
>
>After speaking to people at DevCon (I can't remember who) I was told that this had been fixed already, but even after updating my OLEDB provider to the one shipped with the VFP 8 beta the error still occurs.
>
>My Connection string is "Provider=vfpoledb.1;Data Source=Path\To\My.DBC", I can post the VB code to repeat my problem if anyone would like me to.
>
>I would be most greatfull if someone could point me in the right direction in fixing this please.
>
>Thanks in Advance.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.