Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Send Variables to a sql view
Message
From
15/04/2004 19:00:00
 
 
To
15/04/2004 18:34:54
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00894597
Message ID:
00895393
Views:
15
>I don't get the error but I don't get a record set returned either.
>adding a +?Morder seemes to simply make the last statement a query rather than make it a seperate query plus an order statement.
>mORDER = 'ORDER BY BRAND, CATEGORY, DESCRIPT '

That surely won't work. When creating a remote view, you're basically writing a select statement in the language of the remote server. VFP can help you by providing variables which will be substituted at runtime - but that doesn't include macros. Macros don't exist in the remote language, and VFP's parser won't expand them for you.

= We are using VFP 7.0, would 8.0 help this issue? It seems a shame that VFP won't let you manipulate MS-SQL just like you manipulate local DBF's.

Anyway, you can always hardcode the default order into the view definition (i.e. put the Order By as a part of the view definition), and then once you actually open the view (NODATA doesn't matter), index it or just select from it into another cursor using any order you like.

= I was thinking of this but before I re-wrote a TON of VFP code I thought I ought to know what was and what was not possible.

SQLExec() won't raise an error, but it will return a -1 if there was an error, and you can issue an aError(aErrArray) to get the ODBC error message into aErrArray, which you can then inspect.
= Is this the infamous "pass through techology" that I have heard so much about? Someone else suggested this way but I have heard it is somewhat complex to implement. I was thinking that the best way to do my tasks was get all the variables defined and then query the database and return the set I wanted.

Thank you for your quick responses. BTW I am a newbie with just enough knowledge to be dangerous.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform