Resize Multidimensional/Associative Array from a Resultset

Asked

Viewed 65 times

1

I’m trying to feed a array multidimensional and associative from a Resultset, but 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
  • http://meta.pt.stackoverflow.com/questions/297/quando-se-deve-colocar-o-nome-da-linguagem-no-t%C3%ADtulo/1911#1911

  • Changed, thank you!

1 answer

1

The command Redim does not allow initial value assignment.

The message Expected end of statement informed in error indicates that the end of the statement in command was expected Redim after the ")".

Browser other questions tagged

You are not signed in. Login or sign up in order to post.