Hello. I am trying to get my stored procedure in access to be called from ASP.
My stored procedure is SP_ADD_EQUIPMENT
INSERT INTO TBL_EQUIPMENT ( PROD_NUMBER, SERIAL_NUMBER, EQUIPMENT_DETAIL_ID, PO_NUMBER, COST, LOCATION_DETAIL_ID, ENTERED_BY, STATUS_AUTHORIZATION_ID )
SELECT [PNUM] AS EXPR1, [SNUM] AS EXPR2, [EDET] AS EXPR3, [PONUM] AS EXPR4, [CST] AS EXPR5, [LDET] AS EXPR6, [ENTBY] AS EXPR7, [SAUTH] AS EXPR8;
I then call it with...
objCmd.CommandText = "{Call SP_ADD_EQUIPMENT ('" & cStr(strProdNumber) & "','" & cStr(strSerialNumber) & "'," & cInt(intEquipDetail) & ",'" & cStr(strPONumber) & "','" & cStr(strCost) & "'," & cInt(intLocDetail) & "," & cInt(intEntby) & "," & cInt(intAuth) & "}"
And execute with...
objCmd.CommandType = adCmdText
objCmd.Execute
There error I get is...
Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.
I use Access 2000, ASP
Thanks!
My stored procedure is SP_ADD_EQUIPMENT
INSERT INTO TBL_EQUIPMENT ( PROD_NUMBER, SERIAL_NUMBER, EQUIPMENT_DETAIL_ID, PO_NUMBER, COST, LOCATION_DETAIL_ID, ENTERED_BY, STATUS_AUTHORIZATION_ID )
SELECT [PNUM] AS EXPR1, [SNUM] AS EXPR2, [EDET] AS EXPR3, [PONUM] AS EXPR4, [CST] AS EXPR5, [LDET] AS EXPR6, [ENTBY] AS EXPR7, [SAUTH] AS EXPR8;
I then call it with...
objCmd.CommandText = "{Call SP_ADD_EQUIPMENT ('" & cStr(strProdNumber) & "','" & cStr(strSerialNumber) & "'," & cInt(intEquipDetail) & ",'" & cStr(strPONumber) & "','" & cStr(strCost) & "'," & cInt(intLocDetail) & "," & cInt(intEntby) & "," & cInt(intAuth) & "}"
And execute with...
objCmd.CommandType = adCmdText
objCmd.Execute
There error I get is...
Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.
I use Access 2000, ASP
Thanks!