dcsimg
Results 1 to 8 of 8

Thread: Local Stored Data

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2012
    Posts
    391

    Local Stored Data

    I've got an application that's getting data from a webservice, essentially it's a copy of data from my database.

    I want to use this locally, store, sort filter data. I don't want to keep it on my local machine as it will be updated at certain intervals.

    what is the best way to store it?

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    99,776

    Re: Local Stored Data

    What exactly does your service method return? It may be fine as it is. Any collection can be sorted and/or filtered using LINQ, although not in-place. If you want to sort and/or filter in-place, particularly if the data is bound to the UI, then a DataTable is probably the easiest data structure to work with. You can bind it to a BindingSource and bind that to the UI, then set the Sort and/or Filter properties of the BindingSource.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2012
    Posts
    391

    Re: Local Stored Data

    it returns as a multi dimensional array

  4. #4
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    99,776

    Re: Local Stored Data

    Quote Originally Posted by ubkra View Post
    it returns as a multi dimensional array
    What does the data represent? Multidimensional arrays have their applications but they should ideally only be used to represent matrices, not to store tabular data. If it is tabular data, i.e. multiple records of multiple columns, then are you in control of the web service to change it? If you can't change that part, how exactly do you want to expose the data to the user?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2012
    Posts
    391

    Re: Local Stored Data

    well, I was going to use it to create a combobox list with options, upon selecting a particular item then showing additional information.

    I've got many examples, essentially I want my data stored in a mysql server and ideally accessed directly from .net but it's remote and i don't want to allow remote connections. There's no free connector of any sort.

  6. #6
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    99,776

    Re: Local Stored Data

    You're not really providing clear answers to my questions. I'm going to assume that it's tabular data and it's your web service. If the web service is .NET based then you can just use a MySqlDataAdapter or MySqlDataReader to populate a DataTable and return that. Your application can then use it as is. If it's not a .NET web service then I'd suggesting creating a type to represent a single record and then create an array or collection of objects of that type. You can then use that as is in your application.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2012
    Posts
    391

    Re: Local Stored Data

    I'm using nuSOAP which is PHP based, yes my data is tabular.

  8. #8
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    32,369

    Re: Local Stored Data

    You probably have a means to return it in tabular format, either as XML or JSON. Even using that multidimensional array will work, though not as cleanly. On the client side, I'd want that data to be in a datatable. That would give you a far greater range of options for sorting, searching, querying, and so forth, all of which would be more difficult in a multidimensional array.
    My usual boring signature: Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width