dafunk2001
Thu Mar 04 18:46:25 CST 2004
actually i just found an amazing article at
http://msdn.microsoft.com/msdnmag/issues/02/12/cuttingedge/default.aspx?
it pretty much explains the architectural differences between all the
options we have brought up in the thread.
The binary formatter when used with DataSet and DataTable objects
actually does output XML so any significant reduction in space
normally attributed to binary formatting is wasted... this might be a
'feature' of .NET maybe? :P
my solution - since portability is not an issue - i will just
implement my own Serializable Class which serializes dataTable
objects. The article discusses this option as well.
That way I will achieve TRUE binary serialization, and hopefully have
faster deserialization times. (my only concern is performance
deserializing... as i mentioned before serializing performance and
space used is no concern)
any other thoughts?
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message news:<#2ma0XcAEHA.2800@tk2msftngp13.phx.gbl>...
> Hi Cip,
>
> Beside the ways Marc suggested there are also DataSet.WriteXml and ReadXml
> methods you might find useful.
> BTW there is no significant difference between binary and xml serialization
> in terms of space.
>
> --
> Miha Markic [MVP C#] - RightHand .NET consulting & software development
> miha at rthand com
> www.rthand.com
>
> "Cip" <dafunk2001@yahoo.com> wrote in message
> news:9f0f419b.0403032044.4c94ef55@posting.google.com...
> > Hi,
> >
> > in a nutshell, is there a quick and efficient way of storing data from
> > a database on each user's machine so that a WinForm application can
> > query/analyze/do whatever it wishes to this local data?
> >
> > the winform app will never need to interact with the original database
> > except the first time it is run - to create the local data files on
> > each user's computer. From then on, each time a user runs the
> > application, the app would be using the local data.
> >
> > I thought of saving the data as XML files... but I am concerned about
> > efficiency. As well, I do not need the files to be viewed through
> > other mediums (web, excel, etc.).
> >
> > Actually, I would prefer it if the local files are NOT viewable in
> > other mediums... only the WinForm application would use the files.
> >
> > If I am able to query data in these local files using SQL (like
> > "select myCol From file1.dat") that would be also be a huge plus....
> >
> >
> > I also thought of loading a DataSet object then serializing it to a
> > file... any links/advice/help on this? I couldnt really find any
> > specific examples/white papers on serializing data, but I am still
> > looking.
> >
> >
> > Any other suggestions? Thank you.