Hi NG,
I have no idea why, but since a while a dataset refuses to write to a
specific xml file.
I get the error message "Der Zugriff auf den Pfad
D:\VS2005Projec ts\BfpNet\BfpNe t\bin\Debug\Bfp .xml wurde verweigert" which
translates to:
"The access to the path D:\VS...... was denied".
The dataset can read from this Bfp.xml without any problems.
The file has no read only flag set or any thing else I can identify as a
cause to this problem.
If I read the xml, set a breakpoint shortly before I write to it again,
delete the file, ds.WriteXml works fine from then on. Now I can start/stop
my app and modify the xml, read write it as often as I want, I have no more
problems.
So why cant I write to the original xml?
Thanks for hints and help.
Regards
Rainer Queck 12 4243
On Sep 19, 1:50 pm, "Rainer Queck" <Rai...@noemail .noemailwrote:
<snip>
So why cant I write to the original xml?
Sounds like you might still have the file open for reading. What
happens if you write to a different file (in the same directory) out
of interest? Or write to the file with an empty dataset (i.e. not
having read from it)?
Jon
Rainer Queck wrote:
Hi NG,
I have no idea why, but since a while a dataset refuses to write to a
specific xml file.
I get the error message "Der Zugriff auf den Pfad
D:\VS2005Projec ts\BfpNet\BfpNe t\bin\Debug\Bfp .xml wurde verweigert" which
translates to:
"The access to the path D:\VS...... was denied".
The dataset can read from this Bfp.xml without any problems.
The file has no read only flag set or any thing else I can identify as a
cause to this problem.
If I read the xml, set a breakpoint shortly before I write to it again,
delete the file, ds.WriteXml works fine from then on. Now I can start/stop
my app and modify the xml, read write it as often as I want, I have no more
problems.
So why cant I write to the original xml?
Are the following true?
- The file is not currently in use/locked by some other (or the same)
application.
- The user trying to write to xml file has permissions to write to it.
- The path in the error message is correct.
Chris.
Perhaps the reference to the original file is still 'locked' because it
hasn't been garbage collected yet? Do you need to call .Dispose() on the
file?
Perhaps post your code?
"Rainer Queck" <Ra****@noemail .noemailwrote in message
news:eo******** **********@TK2M SFTNGP04.phx.gb l...
Hi NG,
I have no idea why, but since a while a dataset refuses to write to a
specific xml file.
I get the error message "Der Zugriff auf den Pfad
D:\VS2005Projec ts\BfpNet\BfpNe t\bin\Debug\Bfp .xml wurde verweigert" which
translates to:
"The access to the path D:\VS...... was denied".
The dataset can read from this Bfp.xml without any problems.
The file has no read only flag set or any thing else I can identify as a
cause to this problem.
If I read the xml, set a breakpoint shortly before I write to it again,
delete the file, ds.WriteXml works fine from then on. Now I can start/stop
my app and modify the xml, read write it as often as I want, I have no
more problems.
So why cant I write to the original xml?
Thanks for hints and help.
Regards
Rainer Queck
Hi Jon,
Sounds like you might still have the file open for reading. What
happens if you write to a different file (in the same directory) out
of interest? Or write to the file with an empty dataset (i.e. not
having read from it)?
This is what I ment (and did) as I wrote :
>==
If I read the xml, set a breakpoint shortly before I write to it again,
delete the file, ds.WriteXml works fine from then on. Now I can start/stop
my app and modify the xml, read write it as often as I want, I have no more
problems.
<==
I can create me a new Bfp.xml, and have no more problems with reading and
writing to it.
Regards
Rainer
Hi Chris,
"Chris Shepherd" <ch**@nospam.ch sh.caschrieb im Newsbeitrag
news:OV******** ********@TK2MSF TNGP04.phx.gbl. ..
Are the following true?
- The file is not currently in use/locked by some other (or the same)
application.
Yes. If I delete the old bfp.xml and create me a new one, I have no more
problems with it.
- The user trying to write to xml file has permissions to write to it.
This is the big question. How can I find out?
- The path in the error message is correct.
Yes.
Regards
Rainer
Perhaps the reference to the original file is still 'locked' because it
hasn't been garbage collected yet? Do you need to call .Dispose() on the
file?
That would not explain, why it works, if I create me a new Bfp.xml and use
that from then on, because if I do so my problems are gone.
Perhaps post your code?
Difficult, because too much.
But I am only using <DataSet>.ReadX ml and <DataSet>.Write Xml to acces the
xml file.
Regards
Rainer
>
"Rainer Queck" <Ra****@noemail .noemailwrote in message
news:eo******** **********@TK2M SFTNGP04.phx.gb l...
>Hi NG,
I have no idea why, but since a while a dataset refuses to write to a specific xml file. I get the error message "Der Zugriff auf den Pfad D:\VS2005Proje cts\BfpNet\BfpN et\bin\Debug\Bf p.xml wurde verweigert" which translates to: "The access to the path D:\VS...... was denied".
The dataset can read from this Bfp.xml without any problems. The file has no read only flag set or any thing else I can identify as a cause to this problem. If I read the xml, set a breakpoint shortly before I write to it again, delete the file, ds.WriteXml works fine from then on. Now I can start/stop my app and modify the xml, read write it as often as I want, I have no more problems.
So why cant I write to the original xml?
Thanks for hints and help.
Regards Rainer Queck
Rainer Queck wrote:
Hi Chris,
"Chris Shepherd" <ch**@nospam.ch sh.caschrieb im Newsbeitrag
news:OV******** ********@TK2MSF TNGP04.phx.gbl. ..
>Are the following true?
- The file is not currently in use/locked by some other (or the same) application.
Yes. If I delete the old bfp.xml and create me a new one, I have no more
problems with it.
>- The user trying to write to xml file has permissions to write to it.
This is the big question. How can I find out?
Right click the file, go Properties, and then look at the Security tab.
This is assuming Windows XP Professional, Windows 2000 (any), Windows
2003, or Windows Vista.
Chris.
there is no security tab.
FYI I am working with XP-Professional.
I know the security can be set "some where", but where?
Regards
Rainer
"Chris Shepherd" <ch**@nospam.ch sh.caschrieb im Newsbeitrag
news:eY******** ********@TK2MSF TNGP02.phx.gbl. ..
Rainer Queck wrote:
>Hi Chris,
"Chris Shepherd" <ch**@nospam.ch sh.caschrieb im Newsbeitrag news:OV******* *********@TK2MS FTNGP04.phx.gbl ...
>>Are the following true?
- The file is not currently in use/locked by some other (or the same) application .
Yes. If I delete the old bfp.xml and create me a new one, I have no more problems with it.
>>- The user trying to write to xml file has permissions to write to it.
This is the big question. How can I find out?
Right click the file, go Properties, and then look at the Security tab.
This is assuming Windows XP Professional, Windows 2000 (any), Windows
2003, or Windows Vista.
Chris.
On Sep 19, 2:08 pm, "Rainer Queck" <Rai...@noemail .noemailwrote:
Sounds like you might still have the file open for reading. What
happens if you write to a different file (in the same directory) out
of interest? Or write to the file with an empty dataset (i.e. not
having read from it)?
This is what I ment (and did) as I wrote :
==
If I read the xml, set a breakpoint shortly before I write to it again,
delete the file, ds.WriteXml works fine from then on. Now I can start/stop
my app and modify the xml, read write it as often as I want, I have no more
problems.
<==
I can create me a new Bfp.xml, and have no more problems with reading and
writing to it.
So how do you get back from that situation to having problems again?
Jon This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: DotNetJunkies User |
last post by:
Hi all,
I have a question on how can I write the entire Dataset to a NTEXT field of SQLServer.
Can anyone help me?
Thanks!
/mike
|
by: Simon |
last post by:
Hi all,
I have a process, where I take a dataset from an SQL call, and need to write
an XML file from that dataset.
The data set can contain 10's of tables, each with 100's of rows, and I have
no way of knowing what the tables are, or what they contain.
I am currently using the Dataset.WriteXML method passing an XMLWriter.
|
by: Rahul Agarwal |
last post by:
Hi
I am trying to write data back to the client using dataset.WriteXML and I
have set the Thread.CurrentThread.CurrentCulture to "no" (norwegian) just
before writing the data using WriteXML.
But dataset.WriteXML dosent seems to be using the CurrentCulture settings
and still writes dates, numeric values using the original settings.
My Code...
|
by: Andreas Palm |
last post by:
I have a dataset that has DBNull in certain columns, now when I write
out this one to XML, I only get the columns as elements that do have
data in it. However I do need also the empty colums as empty elements
in the XML. How to do that ?
I don't understand why there is no simple option to specify the output
format, or did I miss something ?
regards
andreas
|
by: Joe98765 |
last post by:
I have data coming from SQL Server and need to write out some XML. I
have a schema(xsd) for this XML file. Right now I am bringing in the
DataSet and writing out the elements and attributes myself using
xmltextwriter to match schema without really using the xsd at the time
of writing.
The file I create validates but I was wondering is there a better way?
I see things like inferschema method off of dataset, can this be used?
How do you...
| |
by: Wes |
last post by:
Hello,
I have an application using an xml dataset to store app and user settings.
The problem I am having is related to writexml. I have a save button on my
application that updates the dataset and then using the writexml(...)
function saves the dataset to an xml file. I have noticed that the file does
not change everytime I click the save button. I get no errors but the
writexml function does not seem to be updating the xml file.
...
|
by: David Richards |
last post by:
Hi,
I was wondering if anyone could help me. I have DataSet that contains
the following data tables Customers, Calls, Quotes, QuoteDetails,
Competitors, Contacts, Notes, and I have setup relationships
betweenthem. Each row in the customer's data table contains an area
number.
What I would like to do is export all records for specific area to an
XML file.
|
by: Steven Nagy |
last post by:
HI,
This all applies to a project in the compact framework (Pocket PC).
I need to convert a dataset object into XML which I will then send out
via TCP.
In a standard app I would do this as follows:
System.IO.StringWriter sw = new StringWriter();
ds.WriteXml(sw);
|
by: =?Utf-8?B?anAybXNmdA==?= |
last post by:
I've got a DataSet that I save as XML using the DataSet DataTable's WriteXml
method.
If I say XmlWriteMode.IgnoreSchema, it shows up great in Excel, but I can
not reopen the file in my application because there is no schema for it.
On the other hand, I can choose XmlWriteMode.WriteSchema, and the data in
Excel looks more like some kind of code instead of the data: id=NewDataSet,
name=NewDataSet, ns1:IsDataSet=TRUE, etc. If I open this...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |