Developer .NET UPDATE—brought to you by the Windows & .NET Magazine Network
http://www.winnetmag.com


THIS ISSUE SPONSORED BY

Microsoft ASP.NET Connections
http://www.asp-connections.com

Windows & .NET Magazine LIVE!
http://www.winnetmagLIVE.com
(below DEVELOPER .NET PERSPECTIVES)


SPONSOR: MICROSOFT ASP.NET CONNECTIONS

EARLY BIRD DISCOUNT EXPIRES SEPTEMBER 20
FOR LARGEST .NET DEVELOPER EVENT
More Sessions, Top Quality, Unbeatable Value
DevConnections Conferences provide more sessions at a lower cost than other events focused on Microsoft technologies.

Register today for either Microsoft ASP.NET Connections, VS.NET Connections, or SQL Server Magazine LIVE! and you'll get access to over 160 sessions and save $2,990—but only if you act right now as the Early Bird Discount expires September 20.
https://secure.win2000mag.com/events/asp_register.asp

This deal gets even better: Stay for the whole week and save $4,985 when you also register for either Windows & .NET Magazine LIVE! or XML Web Services Connections. Register for the whole week and you'll get access to five conferences and over 240 sessions! Click now before this offer expires:
https://secure.win2000mag.com/events/xml_register.asp


September 17, 2002—In this issue:

1. DEVELOPER .NET PERSPECTIVES

  • Persisting Data Sets—Which Method Is Right for You?

2. ANNOUNCEMENTS

  • Mark Minasi and Paul Thurrott Are Bringing Their Security Expertise to You!
  • New! News, Tips, and More to Keep Your Network Humming

3. RESOURCE

  • Featured Thread: The .NET Framework and WTS

4. NEW AND IMPROVED

  • Use a Free .NET GUI Library to Develop Applications

5. CONTACT US

  • See this section for a list of ways to contact us.

1. DEVELOPER .NET PERSPECTIVES
(contributed by Marquis Howard, marquish@interknowlogy.com)

  • PERSISTING DATA SETS—WHICH METHOD IS RIGHT FOR YOU?

  • I recently had to develop supplemental code for an existing application. To create this supplement, I needed to use existing data-access methods that returned two data sets from a Microsoft SQL Server database. The database was large, so copying it onto my machine wasn't an option. And I didn't want to use a VPN connection to access the database because I sometimes work at the park or library. Microsoft .NET Framework came to the rescue. By using the .NET Framework, all I needed to have on my machine was the two data sets.

    If you've worked with data sets in the .NET Framework, you're probably familiar with the DataSet class's WriteXml method. This method has several different Overload options from which to choose. In my case, I needed to use the String option to write the data set to a specified XML file.

    After I used the WriteXml method to write the data sets to an XML file on my laptop, I used the DataSet class's ReadXml method to read the data back into a data set. However, the results weren't what I expected. Here's a sample of the data set after I read back the data:


     
           Title
           88
         

    I needed only the value between the nodes and the value between the inner <Calendar> nodes. So, I decided to loop through each row and retrieve these values when I read the XML file back into the data set. Sounds simple enough, but in my tests, I retrieved every value except the 88 value between the inner <Calendar> nodes.</p> <p>My next step was to save the original data set, write the contents to an XML file, then immediately read the data back into the original data set. In doing so, I noticed a different structure. Here's a sample of that data set:</p> <div class="geshifilter"><div class="text geshifilter-text" style="font-family:monospace;"><EventCalendar><br />      <Calendar><br />        <Title>Title