?
Solved

Storing Data locally for Windows App C#

Posted on 2010-08-31
5
Medium Priority
?
555 Views
Last Modified: 2013-11-07
My boss has asked me to make some of the DataTables local to our application.  We currently use both Oracle and Sql,.  It can be static at runtime (ie, we don't need to "Create" it on opening the application).  I am wondering the best way to do this, so far I have thought of three methods

Store as a binary Resource
cons - Do not know how to do this, cannot read

Store as XML

Store as a serializable class (But I am not sure how to populate a class like so)

We do have a strongly typed dataset we use after populating, I am just having a tough time figuring on how it should all tie in - any suggestions ?
0
Comment
Question by:gsdevEE
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 22

Assisted Solution

by:plusone3055
plusone3055 earned 400 total points
ID: 33569044
Use Microsoft  Access
0
 
LVL 8

Assisted Solution

by:Gururaj Badam
Gururaj Badam earned 400 total points
ID: 33569061
Since you're saying you already have Strongly Typed DS go for Access.
0
 
LVL 1

Accepted Solution

by:
Toby Riley earned 1200 total points
ID: 33569278
Hi,

Don't do this. Use SQL CE via entity framework or Db40 (quite excellent) http://www.db4o.com/s/linqdb.aspx  object database. Also if you want some abstraction put around it with a Repository Pattern check out the great NCommon project on github http://github.com/riteshrao/ncommon  and his blog @ http://www.codeinsanity.com 

Download the code and look at the unit tests as this is where most of the samples are. There is also a sample app. It's a bit heavy going for the uninitiated but you’ll learn a lot about data access TDD and DDD. Also NCommon can be used against other data ORM’s i.e. NHibernate, PLINQO (My favourite), Entity Framework.

Good luck.
0
 

Author Comment

by:gsdevEE
ID: 33612992
I probable did not word the question right, so I will spit the point among the answers, but I was going more for something like this :

Mark local XML document as embedded content.
Build the project.  
Read the XML :
 public static StronglyTypesDataSet InstanceofDataSet()
        {
            StronglyTypesDataSet data= new StronglyTypesDataSet ();
            Assembly datasetassembly= Assembly.GetAssembly(typeof(StronglyTypesDataSet ));
            Stream byteStream = reflectivePortal.GetManifestResourceStream(EmbeddedXML);
            XmlReaderSettings settings = new XmlReaderSettings();
            settings.ConformanceLevel = ConformanceLevel.Auto;
            settings.IgnoreWhitespace = true;
            settings.IgnoreComments = true;
            XmlReader xmlReader = XmlReader.Create(byteStream);
            data.ReadXml(xmlReader);
            return data;
        }
0
 

Author Closing Comment

by:gsdevEE
ID: 33612999
I was looking for a different better suited solution
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question