Click here to Skip to main content
15,909,829 members
Home / Discussions / C#
   

C#

 
GeneralRe: How can I implement Double click event for button Pin
Jun Du26-Jun-06 5:22
Jun Du26-Jun-06 5:22 
GeneralRe: How can I implement Double click event for button Pin
For_IT27-Jun-06 9:38
For_IT27-Jun-06 9:38 
Question Showing a Control underneath another Control Pin
StyrofoamSUV26-Jun-06 3:58
StyrofoamSUV26-Jun-06 3:58 
AnswerRe: Showing a Control underneath another Control Pin
MatthewAnderson26-Jun-06 4:08
MatthewAnderson26-Jun-06 4:08 
GeneralRe: Showing a Control underneath another Control Pin
StyrofoamSUV26-Jun-06 4:17
StyrofoamSUV26-Jun-06 4:17 
QuestionProblem in accessing the VSS Pin
AnnnS26-Jun-06 3:47
AnnnS26-Jun-06 3:47 
QuestionCompact Access Database using C# Pin
sgrass-11126-Jun-06 3:13
sgrass-11126-Jun-06 3:13 
QuestionMultiple Tables in one XML file Pin
PBS_LKI26-Jun-06 3:12
PBS_LKI26-Jun-06 3:12 
I am writing a service desk application. I have an XML file that a c# webservice accesses.
I have 2 tables inside an xml document. I can read from the xml without any problems but writing back to the file causes errors. Here is an sample of the file:

<?xml version="1.0" standalone="yes"?>
<ServiceDesk xmlns="http://tempuri.org/ServiceDeskData.xsd">

<ServiceCategory>
<category>
<id>1</id>
<type>Hardware - PC</type>
</category>

<category>
<id>2</id>
<type>Hardware - Printer / Scanner</type>
</category>
</ServiceCategory>

<ServiceRequest>

<Call>
<id>PBS00001</id>
<User>Test</User>
<Category>2</Category>
<Description>Some text</Description>
</Call>

<Call>
<id>PBS00002</id>
<User>Someone</User>
<Category>1</Category>
<Description>gbhjbgjhb</Description>
</Call>

</ServiceRequest>
</ServiceDesk>

ServiceDesk is the root element and then ServiceCategory and ServiceRequest are the tables holding the data. The problem occurs when i try to write back a Call to the Service Request Table. If i write to the ServiceRequest table it says that the item (a string array of 4) is too big, and if i write to the Call table it puts it outside the </ServiceRequest> element which breaks the schema. Could anybody give me some suggestions?

The c# code i use is:

DataSet d = new DataSet();
d.ReadXml("http://localhost/ServiceDeskWS/ServiceDeskData.xml");
String [] s = new String[4];
s[0] = assignID();
s[1] = User;
s[2] = Category;
s[3] = Description;
d.Tables["Call"].Rows.Add(s);
d.WriteXml(Server.MapPath("ServiceDeskData.xml"));


Thanks
AnswerRe: Multiple Tables in one XML file Pin
Dustin Metzgar26-Jun-06 3:25
Dustin Metzgar26-Jun-06 3:25 
GeneralRe: Multiple Tables in one XML file Pin
PBS_LKI26-Jun-06 3:38
PBS_LKI26-Jun-06 3:38 
GeneralRe: Multiple Tables in one XML file Pin
Dustin Metzgar26-Jun-06 4:08
Dustin Metzgar26-Jun-06 4:08 
GeneralRe: Multiple Tables in one XML file Pin
PBS_LKI26-Jun-06 4:26
PBS_LKI26-Jun-06 4:26 
GeneralRe: Multiple Tables in one XML file Pin
Dustin Metzgar26-Jun-06 5:07
Dustin Metzgar26-Jun-06 5:07 
AnswerRe: Multiple Tables in one XML file Pin
Rob Graham26-Jun-06 5:14
Rob Graham26-Jun-06 5:14 
GeneralRe: Multiple Tables in one XML file Pin
PBS_LKI26-Jun-06 23:17
PBS_LKI26-Jun-06 23:17 
QuestionCode performance Pin
Kasic Slobodan26-Jun-06 3:01
Kasic Slobodan26-Jun-06 3:01 
QuestionHow to use RTC Client with C#.Net? Pin
Divyang Mithaiwala26-Jun-06 2:48
Divyang Mithaiwala26-Jun-06 2:48 
QuestionForm OnPaint Overflow Exception Pin
Shajeel26-Jun-06 2:23
Shajeel26-Jun-06 2:23 
AnswerRe: Form OnPaint Overflow Exception Pin
Judah Gabriel Himango26-Jun-06 6:15
sponsorJudah Gabriel Himango26-Jun-06 6:15 
GeneralRe: Form OnPaint Overflow Exception Pin
Shajeel26-Jun-06 19:20
Shajeel26-Jun-06 19:20 
GeneralRe: Form OnPaint Overflow Exception Pin
Judah Gabriel Himango27-Jun-06 4:16
sponsorJudah Gabriel Himango27-Jun-06 4:16 
GeneralRe: Form OnPaint Overflow Exception Pin
Shajeel27-Jun-06 20:00
Shajeel27-Jun-06 20:00 
Questioni incounter substring problem Pin
paulcortez26-Jun-06 2:12
paulcortez26-Jun-06 2:12 
AnswerRe: i incounter substring problem Pin
Daniele Ferrero26-Jun-06 2:18
Daniele Ferrero26-Jun-06 2:18 
GeneralRe: i incounter substring problem Pin
johan313126-Jun-06 3:48
johan313126-Jun-06 3:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.