From: keyser soze on
hi
REDIM Preserve reports an "out of range"

i first create an array, store it into a session var
then, in other page, i load restore the session var into a local array
but, after this, i can't REDIM Preserve

thanks
ks


From: Bob Barrows [MVP] on
keyser soze wrote:
> hi
> REDIM Preserve reports an "out of range"
>
> i first create an array, store it into a session var
> then, in other page, i load restore the session var into a local array
> but, after this, i can't REDIM Preserve
>
> thanks
> ks
Please provide a simple repro page:

<%
your code to create simple array and store it in session
%>
<%
your code to retrieve array from session and resize it
%>

One thing: verify that you can resize it successfully before storing it
in session.


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


From: keyser soze on
thanks Bob
i found the answer to the problem...

using : MyArray[ rows, cols ]
then : "PRESERVE" don't work

swaping the "dimensions" (the logic of my page)
i have: MyArray[ COLS , ROWS ]
and now : the "preserve" keyword works

either there is a problem with "preserve"
and the order of dimensions
or the problem begin when store and restore the array

thanks for your fast help, Bob


"Bob Barrows [MVP]" <reb01501(a)NOyahoo.SPAMcom> escribi� en el mensaje
news:uvNUUJ6rIHA.1220(a)TK2MSFTNGP04.phx.gbl...
| keyser soze wrote:
| > hi
| > REDIM Preserve reports an "out of range"
| >
| > i first create an array, store it into a session var
| > then, in other page, i load restore the session var into a local array
| > but, after this, i can't REDIM Preserve
| >
| > thanks
| > ks
| Please provide a simple repro page:
|
| <%
| your code to create simple array and store it in session
| %>
| <%
| your code to retrieve array from session and resize it
| %>
|
| One thing: verify that you can resize it successfully before storing it
| in session.
|
|
| --
| Microsoft MVP -- ASP/ASP.NET
| Please reply to the newsgroup. The email account listed in my From
| header is my spam trap, so I don't check it very often. You will get a
| quicker response by posting to the newsgroup.
|
|

From: Bob Barrows [MVP] on
keyser soze wrote:
> thanks Bob
> i found the answer to the problem...
>
> using : MyArray[ rows, cols ]
> then : "PRESERVE" don't work
>
> swaping the "dimensions" (the logic of my page)
> i have: MyArray[ COLS , ROWS ]
> and now : the "preserve" keyword works
>
> either there is a problem with "preserve"
> and the order of dimensions
> or the problem begin when store and restore the array
>
No, the problem is the failure to read the documentation :-)
Preserve only works for the last dimension of the array.
http://msdn.microsoft.com/en-us/library/c850dt17(VS.85).aspx

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


From: keyser soze on
what? ohhhh... i see... OK
i understand, now, the words : "the last dimension"
( i missunderstood it as the "last row" )

thanks, Bob


"Bob Barrows [MVP]" <reb01501(a)NOyahoo.SPAMcom> escribi� en el mensaje
news:eJ3e756rIHA.2492(a)TK2MSFTNGP06.phx.gbl...
| keyser soze wrote:
| > thanks Bob
| > i found the answer to the problem...
| >
| > using : MyArray[ rows, cols ]
| > then : "PRESERVE" don't work
| >
| > swaping the "dimensions" (the logic of my page)
| > i have: MyArray[ COLS , ROWS ]
| > and now : the "preserve" keyword works
| >
| > either there is a problem with "preserve"
| > and the order of dimensions
| > or the problem begin when store and restore the array
| >
| No, the problem is the failure to read the documentation :-)
| Preserve only works for the last dimension of the array.
| http://msdn.microsoft.com/en-us/library/c850dt17(VS.85).aspx
|
| --
| Microsoft MVP -- ASP/ASP.NET
| Please reply to the newsgroup. The email account listed in my From
| header is my spam trap, so I don't check it very often. You will get a
| quicker response by posting to the newsgroup.
|
|