G
Guest
Hi..
I m just trying to learn using XML file as a datastore.
I am reading a dataset from a XML file and then trying to update the XML
file with some changes in the dataset.
My code is as follwoing.
Private Sub ReadUpdateData()
Dim dsUser As New DataSet
dsUser.ReadXml(Server.MapPath("Datafiles\Users.xml"))
DataGrid1.DataSource = dsUser
DataGrid1.DataBind() 'Read data
dsUser.Tables(0).Rows(0).Item(1) = "xyz" 'changed value
dsUser.WriteXml(Server.MapPath("Datafiles\Users.xml"))
End Sub
The Above code gives me error as Access to the path
"C:\...\Datafiles\Users.xml" is denied
any help will be highly aprreciated.
Cheers,
siaj
I m just trying to learn using XML file as a datastore.
I am reading a dataset from a XML file and then trying to update the XML
file with some changes in the dataset.
My code is as follwoing.
Private Sub ReadUpdateData()
Dim dsUser As New DataSet
dsUser.ReadXml(Server.MapPath("Datafiles\Users.xml"))
DataGrid1.DataSource = dsUser
DataGrid1.DataBind() 'Read data
dsUser.Tables(0).Rows(0).Item(1) = "xyz" 'changed value
dsUser.WriteXml(Server.MapPath("Datafiles\Users.xml"))
End Sub
The Above code gives me error as Access to the path
"C:\...\Datafiles\Users.xml" is denied
any help will be highly aprreciated.
Cheers,
siaj