Classic ASP: inserting into an array and getting type mismatch

weiddolo

New Member
I am trying to insert an int into one array and a string into another. For some reason I can't insert the int or string no matter how I try. Here is the code\[code\]dim siteList,siteNameList, strQuerySet oConn = Server.CreateObject("ADODB.Connection") set oRs = Server.CreateObject("ADODB.Recordset")oConn.Open strConnQuerystrQuery = "Select zSiteID as id, zSiteNm as Name from vSite"set ors = oConn.Execute(strQuery)z=0Do While Not oRs.EOF sID=oRs("id") sName=oRs("Name") if InStr(oRs("Name"),"'")>0 then sOut = replace(strorigFileName,"'" ,"") siteList(z)=sID siteNameList(z)=sOut else siteList(z)=sID(this is where the error occurs first) siteNameList(z)=sName end if z=z+1 oRs.MoveNextLoopoConn.Close\[/code\]I have tried converting it to different things but that hasn't helped at all. I have no idea what is wrong so any information would be greatly appreciated!
 
Back
Top