Solved

Serialize Data from a Database

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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
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 learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

737 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