Results 1 to 3 of 3

Thread: dataset and xml....possible?

  1. #1

    Thread Starter
    Hyperactive Member gmatteson's Avatar
    Join Date
    Feb 2002
    Location
    Rhode Island, USA
    Posts
    293

    dataset and xml....possible?

    rather than loading my xml file and it's different attributes into a multidemensional array, is it possible to load the xml file into a dataset? i noticed that is has a "getxml" property in the dataset...

    i would like to load the xml file into the dataset on formload and bind a combobox and multiple textboxes to the dataset reading differerent attributes from the dataset... is this possible?

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    VB Code:
    1. Dim ds As New DataSet
    2. ds.ReadXML("..\data.xml")

  3. #3

    Thread Starter
    Hyperactive Member gmatteson's Avatar
    Join Date
    Feb 2002
    Location
    Rhode Island, USA
    Posts
    293

    thanks figured it out

    if anyone is interested on how to bind the contols...


    oDataset.ReadXml(Application.StartupPath & "\connections.xml")
    cboDescription.DisplayMember = "settings_Text"
    cboDescription.DataSource = oDataset.Tables("settings")
    txtAddr.DataBindings.Add("text", oDataset.Tables("settings"), "host")
    txtUsr.DataBindings.Add("text", oDataset.Tables("settings"), "username")
    txtPwd.DataBindings.Add("text", oDataset.Tables("settings"), "password")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width