Resize Multidimensional / Associative Array from a ResultSet

1

I'm trying to feed a multidimensional and associative array from a ResultSet, however it accuses the following error:

Microsoft VBScript compilation error '800a0401'
Expected end of statement
/beta/comercialBannersRelatorioGerado.asp, line 53
Redim preserve arrayRs("porIP", "mesPorIP") = rsRelatorio1("mesPorIP")
--------------------------------------------^

And here's the code where I try to do this:

Dim arrayRs() 
while not rsRelatorio1.EOF
    Redim preserve arrayRs("porIP", "mesPorIP") = rsRelatorio1("mesPorIP")
    Redim preserve arrayRs("porIP", "viewsPorIP") = rsRelatorio1("viewsPorIP")
    Redim preserve arrayRs("porIP", "clickPorIP") = rsRelatorio1("clickPorIP")
rsRelatorio1.movenext
wend
    
asked by anonymous 12.11.2014 / 18:09

1 answer

1

The Redim command does not allow initial value assignment.

The Expected end of statement message reported in the error refers to the expected end of the statement in the Redim command after the ")".

    
24.05.2016 / 17:16