Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I execute a VFP stored procedure using SQLEXEC()/
Message
From
16/09/1998 06:49:53
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
15/09/1998 23:59:33
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00135933
Message ID:
00137203
Views:
22
>>This might work on a sql-server back-end but not if you use VFP that way.
>>
>>This is what I tried:
>> param1 = 10
>> lnResult = sqlexec(lnconnection, 'Exec getkey param1')
>> IF lnResult < 0
>> =AERROR(laerror)
>> =aerrmsg(@laerror)
>> ENDIF
>> RETURN lnResult
>>
>>I get a command not recognized command.
>
>You forgot the question mark before param1.
>lnResult = sqlexec(lnconnection, 'Exec getkey ?param1')
Hi Nabil,
This is the pitfall that I also trapped into. He's not sqlconnecting to SQL server but VFP via ODBC. Secondly param1 without ? would be true if it's just an input parameter.
sqlconnect(handle,"{call procedure (input1, input2, ?@output1) }")
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform