Thanks for the feedback..
Summary
Misc Notes:
-Following command works on same computer in both Excel and Access: acct_unmatched_rpt_sp 0,detail
-Following command works on same computer in both Excel, Access and VFP: sp_help &&lists stored procedures
-Using service pack 3 on VFP 6.0
-Confirmed with server manager that the two parameters in the "acct_unmatched_rpt_sp 0,detail" stored procedure are an integer and a string.
The following are results of recent tests:
1) gnConnHandle returns 1, AERROR() returns nothing, lnResult returns -1
Clear
?"Begin stored procedure"
STORE SQLCONNECT('server', 'id', 'password') TO gnConnHandle
?"gnConnHandle ="+str(gnConnHandle) && see that it connected
IF gnConnHandle>0 && if connection made try stored procedure
=SQLSETPROP(gnConnHandle, 'BatchMode', .T.) && ensure batch mode
lcSQL = "{CALL acct_unmatched_rpt_sp}" && with the sp_help sp this works fine
lnResult = SQLEXEC(gnConnHandle,lcSQL)
?"lnResult="+str(lnResult)
=sqldisconnect(gnconnhandle)
do errhand
ENDIF gnConnHandle>0
return
***************** This procedure applies to every example
PROCEDURE errhand
= AERROR(aErrorArray) && Data from most recent error
? 'The error provided the following information' && Display message
oldError=ON("ERROR")
ON ERROR *
FOR n = 1 TO 7 && Display all elements of the array
? aErrorArray(n)
ENDFOR
ON ERROR &oldError
------------------------------------------------------------------------------------------------------------------------------------
2) gnConnHandle returns 1, AERROR() returns nothing, lnResult returns -1
lcSQL="EXECUTE acct_unmatched_rpt_sp 0,'detail'"
------------------------------------------------------------------------------------------------------------------------------
3) gnConnHandle returns 1, AERROR() returns nothing, lnResult returns -1
lcSQL="EXECUTE acct_unmatched_rpt_sp"
------------------------------------------------------------------------------------------------------------------------------
4) gnConnHandle returns 1, AERROR() returns nothing, lnResult returns -1
lcSQL="Purpose: Test Error messages"
--------------------------------------------------------------------------------------------------------------------------------------
5) gnConnHandle returns 1, AERROR() returns nothing, lnResult returns -1
lcSQL = "{CALL acct_unmatched_rpt_sp(0,'detail')}" && with the sp_help sp this works fine
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only