Click here to Skip to main content
15,891,895 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# and SQL deployment issue Pin
pelnor9-Aug-09 5:04
pelnor9-Aug-09 5:04 
AnswerRe: C# and SQL deployment issue Pin
pelnor9-Aug-09 5:11
pelnor9-Aug-09 5:11 
QuestionRead XML File and load result in datagridview Pin
Member 47429229-Aug-09 2:31
Member 47429229-Aug-09 2:31 
AnswerRe: Read XML File and load result in datagridview Pin
Eddy Vluggen9-Aug-09 4:52
professionalEddy Vluggen9-Aug-09 4:52 
QuestionHow to Export Contents of DataTable and DataGridView in Excel without using Excel object. Pin
sharad Pyakurel9-Aug-09 1:36
sharad Pyakurel9-Aug-09 1:36 
AnswerRe: How to Export Contents of DataTable and DataGridView in Excel without using Excel object. Pin
Infarkt9-Aug-09 3:31
Infarkt9-Aug-09 3:31 
AnswerRe: How to Export Contents of DataTable and DataGridView in Excel without using Excel object. Pin
sharad Pyakurel10-Aug-09 1:55
sharad Pyakurel10-Aug-09 1:55 
Questionproblem writing to a file: The process cannot access the file 'c:\scene.xml' because it is being used by another process Pin
reilak9-Aug-09 1:28
reilak9-Aug-09 1:28 
Hi all...
I'm trying to write to a file with the XmlDocument class. I used the Save(string) method which gets a file location and saves the XML to it. the thing is I get an exception:
"The process cannot access the file 'c:\scene.xml' because it is being used by another process".
What is the problem? how can I overcome this? (I want to load the file and then to be able to save on the that file)

some code:
this happens when loading of the file
_currentXMLFile = openXMLFileDialog1.FileName;
System.IO.StreamReader myXMLFileStream = new System.IO.StreamReader(_currentXMLFile);
XmlTextReader myXMLTextReader = new System.Xml.XmlTextReader(myXMLFileStream);
_myXMLDocument = new System.Xml.XmlDocument();
_myXMLDocument.Load(myXMLTextReader);

myXMLDocument is defined at the start of the program so it will have the program's lifespan.

this happens when trying to save the XML document into a file, and throws an exception:
myXMLDocument.Save(fileName);

AnswerRe: problem writing to a file: The process cannot access the file 'c:\scene.xml' because it is being used by another process Pin
Luc Pattyn9-Aug-09 1:33
sitebuilderLuc Pattyn9-Aug-09 1:33 
GeneralRe: problem writing to a file: The process cannot access the file 'c:\scene.xml' because it is being used by another process Pin
reilak9-Aug-09 1:45
reilak9-Aug-09 1:45 
GeneralRe: problem writing to a file: The process cannot access the file 'c:\scene.xml' because it is being used by another process Pin
Luc Pattyn9-Aug-09 1:47
sitebuilderLuc Pattyn9-Aug-09 1:47 
GeneralRe: problem writing to a file: The process cannot access the file 'c:\scene.xml' because it is being used by another process Pin
reilak9-Aug-09 1:50
reilak9-Aug-09 1:50 
GeneralRe: problem writing to a file: The process cannot access the file 'c:\scene.xml' because it is being used by another process Pin
Luc Pattyn9-Aug-09 1:55
sitebuilderLuc Pattyn9-Aug-09 1:55 
GeneralRe: problem writing to a file: The process cannot access the file 'c:\scene.xml' because it is being used by another process Pin
reilak9-Aug-09 2:03
reilak9-Aug-09 2:03 
GeneralRe: problem writing to a file: The process cannot access the file 'c:\scene.xml' because it is being used by another process Pin
Luc Pattyn9-Aug-09 2:15
sitebuilderLuc Pattyn9-Aug-09 2:15 
QuestionCan I get the code of any *.exe file?? Pin
CoderForEver8-Aug-09 9:01
CoderForEver8-Aug-09 9:01 
AnswerRe: Can I get the code of any *.exe file?? Pin
harold aptroot8-Aug-09 9:47
harold aptroot8-Aug-09 9:47 
AnswerRe: Can I get the code of any *.exe file?? Pin
Not Active8-Aug-09 11:16
mentorNot Active8-Aug-09 11:16 
GeneralRe: Can I get the code of any *.exe file?? Pin
CoderForEver9-Aug-09 3:48
CoderForEver9-Aug-09 3:48 
GeneralRe: Can I get the code of any *.exe file?? Pin
Not Active9-Aug-09 4:51
mentorNot Active9-Aug-09 4:51 
GeneralRe: Can I get the code ...?? No! Pin
Luc Pattyn9-Aug-09 5:29
sitebuilderLuc Pattyn9-Aug-09 5:29 
GeneralRe: Can I get the code of any *.exe file?? Pin
CoderForEver10-Aug-09 1:58
CoderForEver10-Aug-09 1:58 
QuestionBlink form Pin
gal0008-Aug-09 5:55
gal0008-Aug-09 5:55 
AnswerRe: Blink form Pin
Not Active8-Aug-09 6:25
mentorNot Active8-Aug-09 6:25 
GeneralRe: Blink form Pin
Judah Gabriel Himango8-Aug-09 8:05
sponsorJudah Gabriel Himango8-Aug-09 8:05 

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.