PC Review


Reply
Thread Tools Rate Thread

Dataset WriteSchema method

 
 
Tom
Guest
Posts: n/a
 
      1st Oct 2003
Hope this isn't posted twice. The other one disappeared...anyway -

Having trouble getting a particular value to stick with this method. I have
a little XML file to store some data for a .NET Windows application. I use
the WriteSchema method of the dataset I read it into to keep it updated.

In the code below, the text in the textbox txtBase is normally supplied by
the FileName property of an OpenFileDialog component. However, this text
value never will write to the file! If I restart the program and merely
type some text in the textbox, or if I hardcode a string value in the code,
the file is updated correctly.

Anyone know how to make this work??


Dim rwSystem As DataRow = dsSettings.Tables(0).Rows(0)

rwSystem("BaseDirectory") = txtBase.Text
dsSettings.AcceptChanges()
dsSettings.WriteXml("ProgramSettings.xml", XmlWriteMode.WriteSchema)


 
Reply With Quote
 
 
 
 
Hema Nagarajan
Guest
Posts: n/a
 
      2nd Oct 2003
Tom,
Can you provide more information or code where you set
the text box's text to the file name property of your OpenFileDialog
component? Using the code you provided, I was not able to reproduce your
problem for simple cases. I also tried providing special characters like
"\", "*" and it worked.

Regards,
Hema Nagarajan
VB Dot Net QA Team

 
Reply With Quote
 
tom burriss
Guest
Posts: n/a
 
      3rd Oct 2003
Thanks for the reply. The method to fill the textbox is as follows:

Dim strPath As String
Dim x As New OpenFileDialog()

x.InitialDirectory = txtBase.Text
x.ShowDialog()
strPath = x.FileName
If strPath.Length > 0 Then
txtBase.Text = strPath
End If


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ReadXml() method: standard DataSet vs. typed DataSet MikeOtown Microsoft ADO .NET 0 6th Dec 2007 05:15 PM
XMLImportXML method using getXML/writeXML method on dataset with m =?Utf-8?B?c29mdGVuZ2luZQ==?= Microsoft Dot NET 0 14th Sep 2005 10:41 PM
Filling a Dataset and Dataset.WriteXML method.. Serdar C Microsoft C# .NET 3 31st Dec 2004 08:07 AM
Best Method for DataSet Vivek Microsoft ADO .NET 3 22nd Jul 2004 08:52 AM
Best method to deal with dataset??? Vivek Microsoft ADO .NET 0 20th Jul 2004 01:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:13 PM.