Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Send Variables to a sql view
Message
From
15/04/2004 18:34:54
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
15/04/2004 18:22:44
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00894597
Message ID:
00895379
Views:
20
>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.

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.

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.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform