Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Gotcha -- EXEC needed when calling paramerized stored pr
Message
 
 
To
14/08/2003 11:58:29
Tom Johnson
Plymouth Rock Technology, Inc.
Plymouth, Massachusetts, United States
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00820178
Message ID:
00821049
Views:
22
Hi Tom,

FYI, it always worked this way in SPT. I suspect that CA internaly uses the same code for ODBC data source.

>This one drove me nuts. It turns out that for VFP8, ?parameters aren't evaluated when calling a stored procedure in the CursorAdapter (Datasourcetype=ODBC) unless you prefix the command with "EXEC".
>
>See the difference between lines 1&2. It took me a day to find this subtlety.
>
>cSelectCmd="EXEC CustOrdersDetail ?lnId" && THIS DOES WORK !!!!!!!!!
>cSelectCmd="CustOrdersDetail ?lnId" && THIS DOES NOT WORK !!!!!!!!!
>cSelectCmd="CustOrdersDetail 10248" && this will work but the parameter is hardcoded
>
>
>Code to replicate againsts Northwind on SQLSERVER is given below...and no I don't use "secret" for my sa password :)
>
>Best regards,
>
>Tom Johnson
<snip>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform