Unanswered: A for loop,2 arrays and a stored proc - problems!
i have 2 one dimension arrays.
One has the name of a skill such as Java,UML,C in each cell
in a corresponding array i have an id for each skill.
the arrays are populated and passed onto another page when a form is submitted. The forms POST looks like this :
where 2 and 4 is a skill level. In my code i want to loop through the first array - get the skill name,2nd array- get the id of that skill and then do a trim request from the POST to get the value for that skill.
and guess what im having some errors!
For iLoop = LBound(skills_array) to UBound(skills_array)
set objConn = Server.CreateObject("ADODB.Connection")
set objComm = Server.CreateObject("ADODB.Command")
objConn.Open "Provider=SQLOLEDB; Data Source=(local); Initial Catalog=Skills; UId=sa; Pwd="
objComm.ActiveConnection = objConn
objComm.CommandType = 4 'adCmdStoredProc
objComm.CommandText = "update_skills"
set param_user = objComm.CreateParameter("nt_user", adInteger, adParamInput, , employee_rid)
set param_skillrid = objComm.CreateParameter("skill_rid", adInteger, adParamInput, , rids_array(jLoop))
rating = Trim(Request(skills_array(iLoop)))
set param_rating = objComm.CreateParameter("rating", adInteger, adParamInput, , rating)
jLoop = jLoop + 1
Application uses a value of the wrong type for the current operation.
yeah thanks for that. I had tried that already to make sure they were all the proper type. Without appending them to the sproc the method im using worked grand. I tested to make sure everything was numeric and strings etc but once i went to add them to the sproc...bad times!
If you are getting a type mismatch on your CInt then you are passing a value that can't be represented as an integer... which goes back to my orginal post about the values you are using being incorrect for the parameter type.
Check your values that you are passing again and ensure they are valid integers....