Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > BOOK: Beginning XML Databases
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning XML Databases
This is the forum to discuss the Wrox book Beginning XML Databases by Gavin Powell; ISBN: 9780471791201
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning XML Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old January 22nd, 2010, 08:08 PM
Authorized User
Join Date: Jan 2010
Posts: 33
Thanks: 13
Thanked 0 Times in 0 Posts
Default XML datareader question


Within .NET Framework there is System.Data.SqlClient namespace and within
that there is SqlDataReader object that has a read method. As shown in the
code this read method can read in desired dataset and store it in a control
and display it. Instead of SQL Server data I am dealing with XML data file
and with XSL formatter and would like to know a compable way of reading in
desired XML data or nodes. Thanks


Dim MyConnection As SqlConnection
Dim MyCommand As SqlCommand
Dim MyReader As SqlDataReader
Dim CT1 As String
Dim CaseTrackConnectionString As String
CaseTrackConnectionString =
ConfigurationManager.ConnectionStrings("Collection ConnectionString").ConnectionString
MyConnection = New SqlConnection(CaseTrackConnectionString)
MyCommand = New SqlCommand
CT1 = "SELECT * FROM Driver WHERE DriverID='" +
DriverDropDownList.SelectedValue.ToString + "'"
MyCommand.CommandText = CT1
MyCommand.CommandType = CommandType.Text
MyCommand.Connection = MyConnection
MyReader = MyCommand.ExecuteReader(CommandBehavior.CloseConne ction)
While MyReader.Read()
If MyReader("DriverMobile") IsNot System.DBNull.Value Then
DriverMobileLabel.Text = MyReader("DriverMobile")

Reply With Quote

Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
XML datareader jtnchang XML 0 January 22nd, 2010 08:03 PM
XML question for you XML Gurus SQLScott SQL Server 2005 1 June 25th, 2008 11:29 AM
Convert XML to XML template question bonekrusher XSLT 3 July 12th, 2007 07:47 AM
convert XML to XMl - Another Namespace question bonekrusher XSLT 2 July 10th, 2007 07:32 AM
DataReader from XML VictorMk Classic ASP XML 0 April 4th, 2005 11:09 AM

All times are GMT -4. The time now is 12:33 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.