Solved

Serialize Data from a Database

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
  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 …
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 user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

914 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

18 Experts available now in Live!

Get 1:1 Help Now