I try to split a javascript array by sendig it to the asp page save to an asp array, then split up the array.
Then I would like to loop thrue the array and I put the "insert into the database" statement inside the loop to insert the records into an access database table, but somhow it doesnt work.
If I use the insert statement once it works fine.

Any bright ideas?
here is the code

<%session("login") = Request.ServerVariables("AUTH_USER")
session("login") = "admMNT"

strProvider="Driver=Microsoft Access Driver (*.mdb); DBQ=c:\Inetpub\wwwroot\favo\FavoritLager.mdb;"
set objConn = server.createobject("ADODB.Connection")
objConn.Open strProvider
set cm = Server.CreateObject("ADODB.Command")
cm.ActiveConnection = objConn

'lagerSynlighet = request.queryString("lagerSynlighet")
lagerSynlighet = "0,1,1,1,2,1,3,0,4,0,5,1,6,1,7,1,8,0,9,1,10,0"
'myArray1 =
myArray = split(lagerSynlighet,",")

<title>H&#228;mta Favoritlager</title>

FOR i=0 TO UBound(myArray)

cm.CommandText ="INSERT INTO FavoritLager(LoginId,LagerOrdning,Lagersynlighet) VALUES (?,?,?)"
set objparam=cm.createparameter(, 200, , 255,session("login"))
cm.parameters.append objparam
set objparam=cm.createparameter(, 200, , 255,myArray(i))
cm.parameters.append objparam
set objparam=cm.createparameter(, 200, , 255, myArray(i))
cm.parameters.append objparam
Set objparam = Nothing