Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Read XML File into DataSet
Author:
KBailey
Submitted:
9/27/2003
Version:
VB.NET 2002
Compatibility:
VB.NET
Category:
XML
Views:
121127
Simple code to read the contents of an XML File into a DataSet and then binds it to a DataGrid.
Declarations:
Imports System Imports System.Data Imports System.Data.SqlClient
Code:
Private Sub btnReadXMLData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReadXMLData.Click Dim dsPubs As New DataSet() ' Read in XML from file dsPubs.ReadXml("Pubs.xml") ' Bind DataSet to Data Grid grdData.DataMember = "publishers" grdData.DataSource = dsPubs End Sub
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2023 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement