Would someone please look at this code and see what I am doing wrong? The page is used for updating existing records. The user can change one of three inputs and this page receives the from variables, does the calculation and passes them to the sql in the form of variables.
Here is the error message:
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
Originally posted by rnealejr
I reread your post and see that you are using sql server - have you tried that update statement in query analyzer ?
I used the return of the response.write on the cmd page to type in the sql statement into the query analyzer. It ran with no errors.
I mis-stated the data type of ProHour, it is numeric as well. I wraped the value (3) in single quotes and no quotes in the analyzer and it ran both ways. I took the single quotes out of the asp however.
All numeric fields are of percision 10 and scale 0 (default).
Here is how I calculating and passing value to the variables I added the Clng latter just grasping at straws.
TotProd = (rsGtVar.Fields.Item("Prod").Value)
If IsNull(TotProd) Then TotProd = 0
TotRM = (rsGtVar.Fields.Item("RM").Value)
If IsNull(TotRM) Then TotRM = 0
CumProd = request.form("txtProd")
HrlyProd = Clng(CumProd) - Clng(TotProd)
CumRM = request.form("txtRM")
HrlyRM = Clng(CumRM) - Clng(TotRM)
STDRM = 60
ProdID = Session("ProdID")
Hourhdr = Clng(request.form("txtHour"))
if Hourhdr = 0 then hourhdr = 1
Speedhdr = (rsSPD.Fields.Item("SPD").Value)
If isNull(Speedhdr) then Speedhdr = 0
If Speedhdr = 0 Then OEEii = 0
If Speedhdr <> 0 Then
Denom = Hourhdr*60*Speedhdr