I cannot get my called SQL procedure to work. DisplayF3 is the name of my SQL stored procedure. strEmployee_Number is the string variable holding the parameter for DisplayF3.
I am getting error message: "Expected query name after EXECUTE" Run-Time error -2147217900
I checked the database to be sure the stored procedure is there. Do I need a command object or something??
I need the recordset opened at the same time I EXECUTE the query. The sql for the recordset is in the stored procedure. See below for copy of stored procedure as stored in database.
strSQL = "EXECUTE DisplayF3 " & (strEmployee_Number)
'Open recordset.
adoRsF3Screen.CursorType = adOpenStatic
adoRsF3Screen.LockType = adLockOptimistic
adoRsF3Screen.Open Source:=strSQL, _ ActiveConnection:=adoConnection, _
Options:=adCmdStoredProc
*********STORED PROCEDURE**********
DisplayF3
PARAMETERS [Employee_Number] IEEEDouble;
SELECT EMPNO, DEPT, WRATE, MTD_AMT, QTD_AMT, YTD_AMT, WAGENAME, BASSEARN.WAGENO
FROM BASSEARN INNER JOIN BASSWAGE ON BASSEARN.WAGENO = BASSWAGE.WAGENO
WHERE EMPNO =[Employee_Number];
Any-Body with help
Thank You
TNN, Tom
TNPAYROLL@AOL.COM
TOM
I am getting error message: "Expected query name after EXECUTE" Run-Time error -2147217900
I checked the database to be sure the stored procedure is there. Do I need a command object or something??
I need the recordset opened at the same time I EXECUTE the query. The sql for the recordset is in the stored procedure. See below for copy of stored procedure as stored in database.
strSQL = "EXECUTE DisplayF3 " & (strEmployee_Number)
'Open recordset.
adoRsF3Screen.CursorType = adOpenStatic
adoRsF3Screen.LockType = adLockOptimistic
adoRsF3Screen.Open Source:=strSQL, _ ActiveConnection:=adoConnection, _
Options:=adCmdStoredProc
*********STORED PROCEDURE**********
DisplayF3
PARAMETERS [Employee_Number] IEEEDouble;
SELECT EMPNO, DEPT, WRATE, MTD_AMT, QTD_AMT, YTD_AMT, WAGENAME, BASSEARN.WAGENO
FROM BASSEARN INNER JOIN BASSWAGE ON BASSEARN.WAGENO = BASSWAGE.WAGENO
WHERE EMPNO =[Employee_Number];
Any-Body with help
Thank You
TNN, Tom
TNPAYROLL@AOL.COM
TOM