Results 1 to 3 of 3

Thread: reading a dataset

Threaded View

  1. #1

    Thread Starter
    Registered User jkw119's Avatar
    Join Date
    Oct 2001
    Location
    Pittsburgh
    Posts
    256

    reading a dataset

    ok,

    does anyone know how to read a dataset...

    i have an xml file that contains 3 columns of data and the following code that puts it into a datagrid on the form.

    VB Code:
    1. Dim myStream As System.IO.Stream
    2. Dim openFileDialog1 As New OpenFileDialog()
    3.  
    4. openFileDialog1.Title = "Open an XML file to analyze"
    5. openFileDialog1.InitialDirectory = "c:\"
    6. openFileDialog1.Filter = "xml files (*.xml)|*.xml|All files (*.*)|*.*"
    7. openFileDialog1.FilterIndex = 1
    8. openFileDialog1.RestoreDirectory = True
    9.  
    10. If openFileDialog1.ShowDialog() = DialogResult.OK Then
    11. myStream = openFileDialog1.OpenFile()
    12. ProfileName = openFileDialog1.FileName
    13. MsgBox(ProfileName)
    14.  
    15. Dim newDataSet As New DataSet()
    16. newDataSet.ReadXml(ProfileName)
    17. DataGrid1.SetDataBinding(newDataSet, "point")
    18.      If Not (myStream Is Nothing) Then
    19.           myStream.Close()
    20.      End If
    21. End If

    so how do i read each colum in the datagrid into an array

    column1(x), column2(x), column3(x) so i can do some calculations (like multiply each column by 3) then repopulate the dataset...

    i am new to this whole database stuff, i don't even know if i need to read it into an array or what..

    thanks,

    jeff
    Attached Files Attached Files

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