Beginning Visual Basic .NET Databases / Edition 1

Paperback (Print)
Used and New from Other Sellers
Used and New from Other Sellers
from $1.99
Usually ships in 1-2 business days
(Save 96%)
Other sellers (Paperback)
  • All (11) from $1.99   
  • New (2) from $50.0   
  • Used (9) from $1.99   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$50.00
Seller since Tue Oct 07 09:37:03 EDT 2014

Feedback rating:

(184)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
$51.52
Seller since Tue Oct 07 09:35:53 EDT 2014

Feedback rating:

(294)

Condition: New
Brand New Item.

Ships from: Chatham, NJ

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Page 1 of 1
Showing All
Close
Sort by

Overview

Almost all applications have to deal with data access in some way or another. This book will teach you how to build Visual Basic .NET applications that make effective use of databases. Visual Basic .NET is the latest version of the most widely used programming language in the world, popular with professional developers and beginners alike.

Starting with a guide to the basic principles of database design, we then examine how to query databases and how to access their data - both in Windows applications and remotely using the Internet and Web Services. Every new concept is explained thoroughly with Try It Out examples, plenty of code samples, and end-of-chapter questions to test you.

This book covers:

  • The basic principles of relational database design
  • Microsoft SQL Server Desktop Engine
  • Querying the database with the T-SQL language
  • Visual Studio .NET and the Server Explorer
  • ADO.NET and the DataSet
  • Data binding, updating the database, and conflict resolution
  • XML's role in ADO.NET
  • Accessing data with ASP.NET and Web Services
Read More Show Less

Product Details

  • ISBN-13: 9781861005557
  • Publisher: Wrox Press, Inc.
  • Publication date: 12/1/2001
  • Series: Beginning Ser.
  • Edition number: 1
  • Pages: 695
  • Product dimensions: 7.21 (w) x 9.00 (h) x 1.53 (d)

Meet the Author

Denise Gosnell, a Microsoft Certified Solution Developer, works for Microsoft as a consultant in the MCS National Retail Consulting Group. She received a Bachelor's degree in Computer Science - Business (summa cum laude) from Anderson University and a Doctor of Jurisprudence from Indiana University in Indianapolis. Denise is an attorney licensed to practice law in Indiana and is an active member of the Indiana and Indianapolis Bar Associations. She recently co-authored the MSDE Bible published by IDG Books in December 2000. Denise has worked in the computer industry for over 7 years. She hopes to find unique ways to utilize her diverse background in law and technology.

After working with Wrox Press on a number of projects since 1999, Matthew Reynolds is now an in-house author for Wrox Press writing about and working with virtually all aspects of Microsoft .NET. He's also a regular contributor to Wrox's ASP Today and C# Today, and Web Services Architect. He lives and works in North London.

Bill Forgey has several years of consulting experience in software design and development. He has created many applications using ASP, Delphi, Pascal, Visual C++, and Visual Basic and specialized in n-tier architecture using SQL, ADO, and COM development. Bill currently works as the Technical Lead at a large bank introducing project methodology, new technologies, and training to different development teams throughout the bank. Bill can be contacted via e-mail at bforgey@vbcentral.net.

Read More Show Less

Read an Excerpt

Chapter 12: ADO.NET and XML

In this chapter, we're going to be introducing the concept of Extensible Markup Language, or XML. For a while now, XML has been touted as an important technology for the storage and exchange of data and, with the advent of .NET, powerful XML functionality can be available to our application with minimal work.

In this chapter, we'll be looking at the essential nature of XML and see a few of the basic tools that are provided by .NET and ADO.NET for the creation and manipulation of XML data.

What is XML?

XML was invented as a technology for overcoming the problems involved in the relatively common activity of exchanging data between applications. However, XML is increasingly being used as a data storage and transport mechanism.

XML is one of those curious technologies that, while it seems scary to a newcomer, the principles are actually very easy to grasp. (Building an end-to-end solution using XML throughout can get a little tricky, however!) The classes available to us in the .NET Framework provide ways to read, write, and explore XML-formatted data very easily.

Despite its name, XML is probably best thought of not as a "language", but rather as a set of rules for defining markup languages. In order for applications to exchange data, the data has to be "marked up" in some way. This marking up allows an application receiving the data to make sense of it and use it in a useful manner. For example, if I give you a bit of data like this:

Disraeli

…how do we know what that data is? However, if I give you a little more information about the data, like this:

My Dog's Name: Disraeli

…then, using common sense, we can all understand what that bit of data represents. In the latter case, I've "marked up" the data. By using the English language, English-speaking readers at least can use the set of common sense rules that we all carry around in our heads to determine what I'm trying to say. XML is a "meta language" or, in other words, is self-describing – it gives the data and the rules to follow to determine what the data is.

As we said, XML is not a language but rather a set of standards and rules for creating your own markup languages. One of these rules is that XML documents must be well-formed. There are over a hundred rules for creating a well-formed XML document, but here are the three basic ones (luckily, the other ones are things you're unlikely to do anyway and so aren't of much importance):

  • Every document must have exactly one top-level element.
  • Elements must be closed in the reverse order that they were opened, that is, you can't do this:
    <ElementOne>Data<ElementTwo>MoreData</ElementOne></ElementTwo>
    

    ...because ElementOne is closed before ElementTwo is closed.

  • Case sensitivity is important. MyElement is not the same as mYeLEMENT.

A Sample XML Document

XML is a fairly curious language because it seems a little "off planet" in concept until you actually start looking at some. Here is an XML document viewed in IE...

Those of you who have seen HTML code will notice that the XML files look very similar. That's because they both share a common ancestor. Standard Generalized Markup Language, or SGML, was the inspiration for both.

XML files work on the concept of tags and elements. A tag can either be a "start tag" or an "end tag" (or "both" – sometimes start and end tags are combined, but we'll see this later). Here's an example of a start tag:

<ShipCity>

…and here's an example of an end tag:

</ShipCity>

You can see that both kinds of tags start with a less-than sign and end with a greater-than sign. This is how tags are delimited. The name of the tag appears between these two signs, and, in this example, the name of the tag is ShipCity. The difference between a start tag and an end tag is that, on an end tag, the name is prefixed with a forward-slash character.

Together, a start tag and an end tag make an element. The text between the two tags is the data that belongs to the tag. For example:

<ShipCity>Albuquerque</ShipCity>

In this case, we have an element called ShipCity; the value of that element is Albuquerque.

Here are the elements that make up order 11077 as shown in our XML document:

  • <OrderID>11077</OrderID>
  • <CustomerID>RATTC</CustomerID>
  • <EmployeeID>1</EmployeeID>
  • <OrderDate>1998-05-06T00:00:00.0000000+01:00</OrderDate>
  • <RequiredDate>1998-06-03T00:00:00.0000000+01:00</RequiredDate>
  • <ShipVia>2</ShipVia>
  • <Freight>8.53</Freight>
  • <ShipName>Rattlesnake Canyon Grocery</ShipName>
  • <ShipAddress>2817 Milton Dr.</ShipAddress>
  • <ShipCity>Albuquerque</ShipCity>
  • <ShipRegion>NM</ShipRegion>
  • <ShipPostalCode>87110</ShipPostalCode>
  • <ShipCountry>USA</ShipCountry>

Now life starts to get interesting. Elements can contain other elements. In this case, we have a start tag called Order and an end tag called Order.

<Order>
<OrderID>11077</OrderID>
<CustomerID>RATTC</CustomerID>
<EmployeeID>1</EmployeeID>
<OrderDate>1998-05-06T00:00:00.0000000+01:00</OrderDate>
<RequiredDate>1998-06-03T00:00:00.0000000+01:00</RequiredDate>
<ShipVia>2</ShipVia>
<Freight>8.53</Freight>
<ShipName>Rattlesnake Canyon Grocery</ShipName>
<ShipAddress>2817 Milton Dr.</ShipAddress>
<ShipCity>Albuquerque</ShipCity>
<ShipRegion>NM</ShipRegion>
<ShipPostalCode>87110</ShipPostalCode>
<ShipCountry>USA</ShipCountry>
</Order>

Notice how the data that's contained within the Order element is a bunch of other elements. XML is hierarchical in nature, which means that the Order element contains a set of thirteen child elements, and each of those thirteen child elements represents one column from one particular row. The upshot of this is that if we have an Order element, we can drill down into its child elements to learn everything about the Order that we could possibly need to know.

If you look further into the document, you'll notice that each of the two Order elements is contained within a master Order element. (I've omitted some elements here for clarity.)

<Orders>
<Order>
…
</Order>
<Order>
…
</Order>
</Orders>

Again, this means that, if we have an Orders element, we can assume that we have a list of orders contained within. We also know that each order is encapsulated in its own element called Order. As we stated earlier, every XML document must have exactly one top-level element, called the root element. In this case, we do indeed have only one top-level element: Orders. If we omitted this element, the file would not be well-formed. For example, here's the same document again but without the single top-level element:

<Order>
…
</Order>
<Order>
…
</Order>

In this case, the document has two top-level elements. Under the rules of XML, this document is not well-formed – therefore it cannot be used.

Attributes

There is another way of introducing data into an XML file, although it's mainly used for "metadata", or data about the data. In this chapter, we're not going to concern ourselves with attributes, but here's a little information so you're aware of them. Take our OrderID element. If we wanted to indicate that this element was an ID column, we might add an IsId attribute that looks like this:
<OrderID IsId="True">11077</OrderID>

Attributes have the form of a parameter="value" pair, and sit within the opening tag of an element. We can have as many attributes as we like, and store any data that we like in them:

<OrderID IsId="True" AnotherAttribute="92384">11077</OrderID>

That's the basis behind XML. At this level, XML is mostly common sense and, I'm confident, pretty easy to understand. Because of this, what we'll do next is build the app that produces this output. This will bring the potentially fuzzy points of our discussion so far into sharp focus.

Creating an XML Document

In this chapter, we're going to be looking at an application that's capable of exporting the orders defined in the system to XML documents.

Try It Out – Creating the Project

1. Using Visual Studio .NET, create a new Visual Basic | Windows Application project and call it Order Export.

2. When the Designer for Form1 appears, drag on a DataGrid control and a couple of Buttons, like this:

3. Change the properties for the controls in the Properties window, as shown below:

4. Using the toolbox, drag on a new SaveFileDialog control. Change its Name property to dlgSaveFile.

That's the basic design of the form finished. Now we just need to add some business logic functionality.

Saving DataSets as XML

As ADO.NET has built-in support for XML – it uses XML as its internal data format – this gives us great flexibility in using ADO.NET to access various types of data. In this next section, we are going to look at how we can save DataSets as XML documents....
Read More Show Less

Table of Contents

Introduction ..... 1
Chapter 1: Relational Database Design ..... 9
Chapter 2: Microsoft SQL Server 2000 Desktop Engine ..... 39
Chapter 3: Querying the Database ..... 77
Chapter 4: Exploring the Server Explorer ..... 103
Chapter 5: The User Interface for the Database ..... 127
Chapter 6: Data Access with ADO.NET ..... 173
Chapter 7: Reading Data into the DataSet ..... 237
Chapter 8: Data Binding ..... 293
Chapter 9: Updating the DataSet and Handling Errors ..... 341
Chapter 10: Conflict Resolution ..... 381
Chapter 11: ASP.NET ..... 407
Chapter 12: ADO.NET and XML ..... 451
Chapter 13: Web Services ..... 503
Chapter 14: Disconnected Data ..... 559
Chapter 15: Case Study – B2B Application Integration Using XML ..... 623
Index ..... 681
Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)