XML

  • Thread starter Thread starter Cor Ligthert [MVP]
  • Start date Start date
C

Cor Ligthert [MVP]

Pitardidis,

What you have in mind?

Do you want to do that on disk, than you cannot do that with an XML, do you
want that in memory, you can simply use the DataSet. But than read and write
the complete everytime the Dataset and therefore you can only use this for
Single User applications.

I hope this gives an idea,

Cor
 
Hi,

I have spent the last two days trying to write a class which will act as a
database table. I will be able to add, delete and update records. Does
anyone have a sample of this kind of data management?

Aristotelis
 
Datasets should keep changes and won't destroy the table if you destroy all
rows. I would suggest first to post about how to solve these particular
problems problems before trying to create your own replacement (my first
guess would be that you don't save the schema but just the data, not sure
what it could be for the first point)...
 
I want to keep the data in memory. When the application will finish I will
call the appropriate member function in order to save the data. I know that
this type of data management will be single user application but it works
fine for my project.

My primary problem is that it does not save the last values that I added in
the DataSet.

An other problem is that if I delete all the records, the table disappears.

If I had a proper example of XML table management, I would change it in
order to work with my problem.

Aristotelis
 
Aristotelis,

That is normal, if you delete the table than it is not anymore after that.
Therefore can you replie this in other words,

Cor
 
The table will be destroyed when I delete all the data, save the dataset and
close the application. The next time that I will try to read data from the
XML file, the table will not be there.
 
Can you show us some code that you use to write the dataset. As Patrice
wrote already you probably don't write the scheme

Cor
 
I do not delete the table. I delete the rows. The table disapears
automatically when there are not records in the table.

Aristotelis
 
Back
Top