FilePermissions in CF?

D

Daniel Barisch

On executing

"Me.DataSet.WriteXml(New System.Xml.XmlTextWriter(strName,
System.Text.Encoding.UTF8), System.Data.XmlWriteMode.WriteSchema)"

(Me.DataSet is a property to a System.Data.DataSet)

I always get an IOException, if the file already exists. I guess there's a
proplem with file-permissions. But the Namespace System.Security.Permissions
is empty in CF?

Whats wrong with this code and how can I access the file-permissions?

Thanks, D.Barisch
 
G

Ginny Caughey [MVP]

Daniel,

It sounds like the file you're trying to write to is already in use if you only
get the IOException when the file previously exists. Does it work if you just
use Me.DataSet.WriteXml(strName)?
 
D

Daniel Barisch

Thank you for your help!
It sounds like the file you're trying to write to is already in use if you only
get the IOException when the file previously exists.
That was the reason! I didn't close the filestream I've used to read the
DataSet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top