Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I can get my 2-dim array to Cache but then I can't get it out

Dim MyList(,) As String
For Each dr In dtClone.Rows
                   ReDim Preserve MyList(1, j)
                   'Load the array from the datareader
                   MyList(0, j) = CType(dr.Item("D"), String)
                   MyList(1, j) = CType(dr.Item("D_PATH"), String)
                   j += 1
               Next
Cache.Item("MyLIST") = DGNList

 

And then later on a different event I want to pull these values back out

 


Dim AList As Array
       Dim j As Integer

       'Cache Array to local 1-dim array
       AList = CType(Cache("MyLIST"), Array)


       For j = 0 To AList.GetUpperBound(1)
           Dim DName As String
           DName = AList(1, j)
       Next j

 

I'm getting late bind error on the AList(1,j) line

I have option strict On

I realize I am dimming a 1-dimensional array to receive the Cache object but that is the only thing that would work.

Any suggestions?

What am I missing here?

Wanna-Be C# Superstar

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...