473,467 Members | 1,586 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Working against Database vs XML file?

I'm doing a little application where I need to store some information very
similar to a table in a database. I don't want to use a database. mostly
cause I feel it's a bit overkill for only one table but also cause I want
to learn more about working with XML.

So... I'm using a Dataset to write the XML to the file.

My problem: I need to use some sort of Unique Identifier per post, is that
possible to have in a XML file? How do I do this?
I guess it's fine to use the Incement thing in the datatable in the dataset
but what about the second time I open the application... and I want to load
the stuff from the XML file.. how do I manage that to keep the unique data
and not overwritten any IDs?

regards
/Lars Netzel


Nov 20 '05 #1
2 940
Lars,

* "Lars Netzel" <no****@no.no> scripsit:
I'm doing a little application where I need to store some information very
similar to a table in a database. I don't want to use a database. mostly
cause I feel it's a bit overkill for only one table but also cause I want
to learn more about working with XML.

So... I'm using a Dataset to write the XML to the file.

My problem: I need to use some sort of Unique Identifier per post, is that
possible to have in a XML file? How do I do this?


Use a GUID, for example. You can use the 'System.Guid' class to create
a GUID and convert it to a string.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
did'nt really understand that but I managed to Read from XML with the
Dataset itself and since I used the AutoIncrement = True in the datatable it
was all automatic..:)

So I have no problems with this now!

/Lars
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> skrev i meddelandet
news:2k*************@uni-berlin.de...
Lars,

* "Lars Netzel" <no****@no.no> scripsit:
I'm doing a little application where I need to store some information very similar to a table in a database. I don't want to use a database. mostly
cause I feel it's a bit overkill for only one table but also cause I want to learn more about working with XML.

So... I'm using a Dataset to write the XML to the file.

My problem: I need to use some sort of Unique Identifier per post, is that possible to have in a XML file? How do I do this?


Use a GUID, for example. You can use the 'System.Guid' class to create
a GUID and convert it to a string.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Wayne Smith | last post by:
Applies to: Microsoft FrontPage 2000, Microsoft Access 2000, IIS 5.0 Operating System: Microsoft Windows 2000 Professional I am trying to protect a portion of a web site by allowing users to...
1
by: Mike Reef | last post by:
I'm trying fulltext searching for the first time , but I can't figure out why the example in the mySQL manual is *not* working. mysql> SELECT * FROM articles -> WHERE MATCH (title,body) AGAINST...
0
by: Stuart Miller | last post by:
When using Java to read in an XML file, I am having problems getting the XML file to be parsed against the specified DTD. Background: I have an existing Java application that allows users to...
5
by: Chris Kettenbach | last post by:
Good Morning, Sorry for xposting. Just need a liitle help. I have an xml file that's generated from a database. How do I select distinct values from a field in xslt and then loop through the...
24
by: Salad | last post by:
Every now and then I see ads that state something like "Experience with Large Databases ...multi-gig...blah-de-blah" And I have to laugh. What's the difference between a large or small database? ...
5
by: Dixie | last post by:
I have a mailmerge that works fine from an MDB database using the OpenDataSource method to send its data from a query within Access as part of an automation sequence. Now, if I compile that mdb...
2
by: Trevor | last post by:
Argh! This problem is driving me nuts! Can you help? In November of 2003, I installed a web service on Windows Server 2003 built in VB.NET for v1.1.4322 of the framework. It contains a timer...
8
by: Gaurav | last post by:
Hi All, I have written the 'c' code for specific purpose and tested it over many files and it is crashing in only one case. When I ran the same code in the debug mode within the VS against the...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.