Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cursor adapter problem
Message
From
06/10/2021 04:07:35
 
 
To
05/10/2021 08:30:54
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01682390
Message ID:
01682445
Views:
49
>>>>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 ;-)
Previous
Reply
Map
View

Click here to load this message in the networking platform