Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Storing Data locally for Windows App C#

Posted on 2010-08-31
5
Medium Priority
?
556 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

610 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