Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating dynamic Arrays
Message
 
To
30/01/2003 06:58:32
Anderson Girardi
Athenas Automação de Escritório
Porto Alegre, Brazil
General information
Forum:
Visual Basic
Category:
VBScript
Miscellaneous
Thread ID:
00747063
Message ID:
00747065
Views:
16
This message has been marked as the solution to the initial question of the thread.
In VB6, the DIM is executed when the procedure starts (and does not depend on the place where the line is in the procedure).

You should do this:

Dim arrayPortas()
instrucaoQuantidadePortas = "SELECT QUANTIDADEPORTAS FROM CLIENTES WHERE CLIENTES.CODCLIENTE = 1"
set rsQuantidadePortas = vgoConn.Execute(instrucaoQuantidadePortas)
ReDim arrayPortas(rsQuantidadePortas("quantidadePortas"))


>Hi,
>
>i would like to create a dinamic Array and i´m trying to use the follow code:
>
>...
>instrucaoQuantidadePortas = "SELECT QUANTIDADEPORTAS FROM CLIENTES WHERE CLIENTES.CODCLIENTE = 1"
>set rsQuantidadePortas = vgoConn.Execute(instrucaoQuantidadePortas)
>Dim arrayPortas(rsQuantidadePortas("quantidadePortas"))
>
>but the compiler shows me the follow error message
>
>int const expected
>
>What is wrong in my code?
>
>thanks
>
>Anderson Girardi
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform