XML as database

  • Thread starter Frank Beerens \(Soft-Solutions\)
  • Start date
F

Frank Beerens \(Soft-Solutions\)

Hello

i want to use xml as a database (anybody an other idea )?
But in visual studio everything on the data tab is disabled. Is there
anybody who can give me an example

Thanks,

Frank Beerens
 
G

Glyn Meek

Frank...the .net CF will NOT let you use schemas and automatically generated
databases as do the regular .net frameworks. You have to 'manually' build
all the records yourself, but we use .xml extensively in our applications on
the .net CF and have had no issues with all the regular xml execution
statements. If you need an example of what we had to do, send me an email
address and I'll attach some code samples!

Regards

Glyn Meek
 
R

Rick Winscot

Frank,

It is possible to use serialized XML or even plain XML as a data store...
but not the intended purpose behind XML. If you are storing configuration
information or small amounts of data... a plain text file should be
sufficient. Something more complex... well, I guess (again) you could use
XML. However, if you are storing a number of items and want to be able to
reliably return these records... I would strongly recommend the standard
(i.e. SQL CE, PDB et al.) database engine offerings. If you could post a
little more details - as to what you are storing, the number of records,
etc... we can better help you.

Cheers,

Rick Winscot
www.zyche.com
 
I

Ilya Tumanov [MS]

CF supports the Data classes, but not the Data designers.
You'll have to code manually like this:

DataSet ds = new DataSet();
ds.ReadXml("<full path here>\\MyXmlDataBase.xml");
dataGrid.DataSource = ds.Tables[0];

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 
G

Ginny Caughey [MVP]

Frank,

In addition to everybody else's comments, XML is pretty slow on CE devices
if you have much data. Generally SqlCe is the data storage solution of
choice, but CSV files can also work (at least better than XML).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top