>>>>I have a cursor adapter that points a view in a postgreSQL database.
>>>>I defined the cursor adapter to map all fields in the view
>>>>When i try to recover data from the view with cursorfill i have no problems if i decide to receive all defined fields.
>>>>If i decide to reduce the number of fields and modify the selectCmd parameter in beforeCursorFill() method i can't open the view...... I have this problem only with some views... not all
>>>>The error i have is :"syntax error at end of input Error while executing the query Code: 1526"
>>>>
>>>>Thanks
>>>I've never used cursor adapters but if you manually run the modified command does it give you a syntax error?
>>
>>While Dragans approach certainly has merit, your approach might be faster.
>
>I suggested that if this faster approach doesn't show the cause, or contains just pure fox objects and properties (like 'insert ... values o.field1, o.field2') etc, which you can't quite run outside of fox.
Yupp, but there is the off chance that the "middle step" of switching from ODBC to OleDB circumvents the problem. For me the easiest way after second try (after 10 min of coffee break for mental reset) to resolve such problems is:
copy / export to local or "remote" dbf,
get SQL syntax running on vfp dbf access
"implement" as minimal CA (.Table, .Alias, .SelectCmd on native)
(copy dbf to remote machine for large files)
verify CA using ODBC or OleDB returns same data
switch over to server while observing personal good luck rituals
In theory CA with ODBC or OleDB could also be checked on local file - here I use paranoid POV ;-)