| |
hiszorn
Posts: 1
Score: 0
Joined: 9/28/2004
From:
Status: offline
|
I have this code written but I am not sure what else I need. I am getting an error on ADODB.Command that the arguements are incorrect. Does anyone have any experience with this? Function MyFunction0( ) dim cmdGetVoucher dim prmIncDec dim prmVoucherNum dim prmErrorState Set cmdGetVoucher = CreateObject("ADODB.Command") cmdGetVoucher.ActiveConnection = strConn cmdGetVoucher.CommandText = "GetNextVoucher" cmdGetVoucher.CommandType = adCmdStoredProc Set prmIncDec = Command.CreateParameter ("@I_tInc_Dec",adTinyInt, adInput,1, 1) cmdGetVoucher.Parameters.Append prmIncDec Set prmVoucherNum = Command.CreateParameter ("@O_vVoucherNumber", adVarChar, adOutput,17) cmdGetVoucher.Parameters.Append prmVoucherNum Set prmErrorState = Command.CreateParameter ("@O_iErrorState", adInt,adOutput,5) cmdGetVoucher.Parameters.Append prmErrorState cmdGetVoucher.execute MyFunction0 = prmVoucherNum.value set cmdGetVoucher = nothing End Function
|
|