Solved

Serialize Data from a Database

Posted on 2000-03-01
4
179 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
  • 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
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 goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now