我正在尝试将一个 int 插入一个数组并将一个字符串插入另一个数组。出于某种原因,无论我如何尝试,我都无法插入 int 或 string。这是代码
dim siteList,siteNameList, strQuery
Set oConn = Server.CreateObject("ADODB.Connection")
set oRs = Server.CreateObject("ADODB.Recordset")
oConn.Open strConnQuery
strQuery = "Select zSiteID as id, zSiteNm as Name from vSite"
set ors = oConn.Execute(strQuery)
z=0
Do 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.MoveNext
Loop
oConn.Close
我曾尝试将其转换为不同的东西,但这根本没有帮助。我不知道出了什么问题,所以任何信息将不胜感激!