Solved

Serialize Data from a Database

Posted on 2000-03-01
4
186 Views
Last Modified: 2010-04-02
I Store some data from a test in a database (MsAcces). Is it possible to serialize this data in one file. I must store the data from one test in one file. I used the database as a buffer.(No dataloss when there is a powerfaillure).
The data is stored from a DaoRecordView in the database
0
Comment
Question by:Degrave
[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
  • 2
  • 2
4 Comments
 
LVL 7

Expert Comment

by:KangaRoo
ID: 2572165
Did you test MS Access against this no- dataloss? Maybe easier to implement a non-cached system directly.
Anyway, it is pretty simple to export data from an MS Access database 'manually' and this procedure can be automated. All a bit clumsy though.
Another way would be to use ODBC or DAO and get the data back from the database. Powerfailure wouldn't be a problem once it is safely stored in the MDB
0
 

Author Comment

by:Degrave
ID: 2573337
Thanks to KangaRoo

I get the data from the dao-database back in a view (I put it in a Datagrid).
It should be possible to Serialize the Datagrid (or the data with the m_pSet->Serialize function), but I don't know how to  do this.
Serializing data only seems to work when you put in the Document
Is it possible to Serialize data in a View without putting it in the Document???
0
 
LVL 7

Accepted Solution

by:
KangaRoo earned 20 total points
ID: 2575739
I am not familiar with DAO / MFC only Access (and C++), but if this DataGrid View is supposed to provide a view on some recordset I would doubt is can be 'serialized'. Why would one want to do that.
It should be possible to create some 'RecordSet' with the data, move through it and write out the data.
0
 

Author Comment

by:Degrave
ID: 2579429
Hello,

I already found a way to serialize the data. In the document, I've a member from my recordset. So, I get the data and I serialize every datapoint.
To get the data, I made a While-loop, but it didn't work. I had to do it with a for-loop. (I think it was a problem with the member function Set.IsEof())

Thanks for your comment
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

717 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