Hi folks,
Some background
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 :
Java=2&C=4&....
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!
Code:
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)
objComm.Parameters.Append(param_user)
set param_skillrid = objComm.CreateParameter("skill_rid", adInteger, adParamInput, , rids_array(jLoop))
objComm.Parameters.Append(param_skillrid)
rating = Trim(Request(skills_array(iLoop)))
set param_rating = objComm.CreateParameter("rating", adInteger, adParamInput, , rating)
objComm.Parameters.Append(param_rating)
objComm.Execute
jLoop = jLoop + 1
Next
error :
ADODB.Command (0x800A0D5D)
Application uses a value of the wrong type for the current operation.
any ideas? Thanks
damalo