473,385 Members | 1,292 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

XML Deserialization / Serialization

I am getting what appear to be read/write conflicts. This is a simple
desktop C# project.

The applicaiton I am creating is a basic group/member system wherein
you create a team and create members for it.

I have a team dialog that upon clicking submit, deserializes (saves)
it.
when the calling method tries to then load all teams (to display them
in a list box), I get conflicts.

Is there a way to make sure that the serialize / deserialize calls are
called as single threads?

/* THE SUBMIT BUTTON CODE */
private void Create_Click(object sender, System.EventArgs e)
{
newTeam.ID = Team.newID();
newTeam.write();
newTeam = null;
this.Close();
}

/* THE PARENT FORM CODE */

private void btn_new_team_Click(object sender, System.EventArgs e)
{
frmTeam mFNT = new frmTeam();
mFNT.ShowDialog();
mFNT = null;
this.loadTeams();
}
public void loadTeams()
{
this.locTeams = Team.getTeams();
foreach (Team mTeam in this.locTeams)
{
this.lst_groups.Items.Add(mTeam.name);
mTeam.write();
}
if (this.LoadTeamsTimer != null)
{
this.LoadTeamsTimer.Enabled = false;
this.LoadTeamsTimer = null;
}
}

/* THE ERROR */
private void btnNewMember_Click(object sender, System.EventArgs e)
The process cannot access the file "C:\Documents and Settings\Dave
Edelhart\My Documents\Visual Studio
Projects\SUIITS\bin\Debug\teams\1.xml" because it is being used by
another process.

Nov 17 '05 #1
0 839

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

Similar topics

2
by: Snowman | last post by:
Suppose I have a RootObject which holds a collection of other objects. The other objects have a property (Parent) which refers back to the "parent" collection (b.t.w. my collection is based on...
4
by: Mike Sarbu | last post by:
Hello all, I have an XML file like this: <?xml version="1.0" encoding="utf-8"?> <SomeObject xmlns="http://www.abcinc.com/objectdefinition"...
3
by: Amadelle | last post by:
Hi all and thanks in advance for your help, I am having problems deserializing an object which seems to be serializing just fine. I save the byte array of the serialized object in the database...
3
by: AnkitAsDeveloper [Ankit] | last post by:
Hi i am serializing a 'ref struct' object as follows : private: void Seri( String ^path, Object^ obj ) { FileStream^ fileStrm ; try { //Serialize entire object into Binary stream
2
by: andreas | last post by:
Hi, if have a object arrSdList of type SortedList for serialization and deserialization there are two subs for doing this Public Sub deser Dim Formatter As BinaryFormatter = New...
3
by: parrot toes | last post by:
Summary: I have been trying to make requests of a web service provided by Axis using a dotnet client with code generated by wsdl.exe and have been getting exceptions when trying to process the...
1
by: parrot toes | last post by:
I tried to post this question before, but there was an error when posting. I case it did get posted and in order to avoid duplication, I'll just repost a summary. I have written a dotnet client...
8
by: ashoksrini | last post by:
Hi All, I have the below requirement and would like to get some feeback from the group on the best way to implement: 1. I have WSDL defined exposing few web services. 2. We dont have a...
12
by: yoshijg | last post by:
Is there a way to be notified when the deserialization of an XML is complete, like a callback method? I tried the IDeserializationCallback interface, but that doesnt for XML-Deserialization. ...
5
by: Greg Allen | last post by:
I am consuming a web service and using the generated Reference.cs to access the service and the objects associated with it. I have run into a problem where some inherited classes are not being...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.