Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error Calling SQL Proc From VFP
Message
From
11/12/2007 00:55:24
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01274675
Message ID:
01274697
Views:
9
When you pass an argument to SQL SP
you can do it this way (other ways will work too)
PRIVATE ln_vehiclekey, 
ln_vehiclekey = 1

iResult = ;
SQLEXEC(._iSQLConnHandle,"EXEC sp_GetVehicle ?ln_vehiclekey", "curresult")
>This code:
>
>
>
>iResult = SQLEXEC(._iSQLConnHandle, [EXEC sp_GetVehicle @vehiclekey=1], sTableName)
>
>
>generates the error "Could not find stored procedure 'EXEC sp_GetVehicle @vehiclekey=1'"
>
>I can run this from SQL console:
>
>
>EXEC sp_GetVehicle 1
>
>
>
>Anyone know what I'm doing wrong?
>
>Thanks
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Previous
Reply
Map
View

Click here to load this message in the networking platform