Click here to Skip to main content
15,748,973 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have a service that returns a list of values as follows:
Using reader As SqlDataReader = dcmd.ExecuteReader()

                   While reader.Read()

                       list.Add(New Entity() With { _
                                .Field1 = reader("Field1").ToString(), _
                                .Field2 = reader("Field2").ToString(), _
                                .Field3 = reader("Field3").ToString() _

                   End While

               End Using
           End Using

           Return list
       End Using

I want to be able to save the Items as separate files in isolated storage in my completed event. How do I do this?

How do I retrieve the data from there as well?

Here's a rough draft of my completed event:

Private Sub GetDataCompleted(ByVal sender As Object, ByVal e As Service.GetDataCompletedEventArgs)
Dim IsolatedStorageFile = IsolatedStorageFile.GetUserStoreForApplication()
            Using stream As IsolatedStorageFileStream = file.OpenFile("", System.IO.FileMode.Create)
                ' write data with writer.Write
                Using writer As New StreamWriter(stream)
                End Using
            End Using
        End Using
    End Sub

After more research, I see that I can store the data in isolated storage and parse it from there. I need to retrieve certain values and pass them in as parameter.

Haven't figured out how to get the data out of isolated storage yet.

<pre lang="vb">Dim userSettings As IsolatedStorageSettings = _

        userSettings.Add("Key", e.Result)

Updated 26-May-11 9:59am
technette 26-May-11 19:29pm    
I got my data into isolated storage.... just don't know how to get it out???

Dim name As String = userSettings.Values("Key")
Txtbox.Text = name ????????

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900