Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SP Call to VFP backend
Message
 
 
To
16/10/2001 16:35:08
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00568870
Message ID:
00569306
Views:
93
>Apparently, in order to retrieve a return value, I first need to use the "adCmdStoredProc" CommandType, then set up a Parameter object, append that param. object to the Command object's parameter collection and then execute the command at which time the Parameter(0) object should contain the return value. the problem is, I can't get the stored procedure command type (adCmdStoredProc) to work when calling the vfp stored procedure. Instead I get the Ole error "Unrecognized Command Verb"
>
>So, either this CommandType is simply not valid when the data source is a VFP dbc, or I am missing something in the CommandText. Here's the exact code I have:

There's a bug in VFP OLEDB provider. It's docimented in the Readme.htm on VFP installation cd:
Syntax of Stored Procedure Calls in Visual FoxPro OLE DB Provider. When calling a stored procedure using the Visual FoxPro OLE DB Provider, set CommandType to adCmdText (1) or to adCmdUnknown (8), and not to adStoredProc (4). Visual FoxPro requires that stored procedures have open and close parentheses "()" at the end of the stored procedure name. However, ADO removes the parentheses from the end of the stored procedure name when you use adStoreProc.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform