Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Pass-Through
Message
From
18/07/1999 14:37:27
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00241018
Message ID:
00242887
Views:
19
I've never seen SQLEXEC() return back -1 and not be able to get the error message from either AERROR() or MESSAGE(). One other thing, if SQLEXEC() returning a -1 will not cause VFP error handler to fire. Change your script to something like this:

LOCAL hConn, lcSQL, lnResult
lcSQL = "{CALL storedprocedure p1, 'p2'}"
hConn = SQLCONNECT(...)
lnResult = SQLEXEC(hConn, lcSQL)
IF (lnResult < 0)
? MESSAGE()
ENDIF

Also, does the user that you connecting to SQL Server as have Execute permission on the stored procedure that you're trying to call?

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform