VBAHole22 Posted October 5, 2004 Posted October 5, 2004 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? Quote Wanna-Be C# Superstar
Administrators PlausiblyDamp Posted October 5, 2004 Administrators Posted October 5, 2004 (edited) How about something like Dim AList(,) As String Dim j As Integer 'Cache Array to local 1-dim array AList = CType(Cache("MyLIST"), String(,)) Edited October 5, 2004 by PlausiblyDamp Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.