Preorder Windows 7 and save 50% or more
 
Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Bookstore...
 
Feedback
Tip Jar
 
XML RSS Feed
 
 
MSDN Visual Basic Community
 
 
 
 
 
 
 
  Visual Basic .NET Database Programming: Updates  
 
Overview Table of Contents Source Code
Related Articles Updates Amazon.com
Amazon.co.uk
 
 
 

19 February 2003, Richard Perez

I bought your book and have been going through it the last few days. Here are some of the things I've run into so far:

  • Chapter 2, page 54, "Design Tools" section.
    If you use SQL Server or Oracle, Visual Basic .NET provides an integrated set of Visual Database Tools to help you model and construct the database. These tools are disabled if you do not use either SQL Server or Oracle. For example, you cannot use the Visual Database Tools if you use ... MSDE even though MSDE is a subset of SQL Server.
    I'm using MSDE with Visual Studio .NET Professional Academic Version, and I can create a database by right-clicking on a sql server instance and choosing 'New Database' from the shortcut menu.

  • Chapter 4 heading on all even pages reads "Chapter 37".

    [This is just a typo.]

  • Chapter 5, page 136, ColumnMapping listing 5.11. I received the following error at the line that maps the zip code: "An unhandled exception of type 'System.ArgumentException' occurred in system.data.dll. Additional information: Cannot add a SimpleContent column to a table containing element columns or nested relations."

    [Well, this certainly seems to be true. It must have changed at some point, possibly during a service pack, because it doesn't work on my system any more either. From a hierarchical standpoint, this makes some sense. If a table contains elements, it probably should not contain loose text that's not in an element. It doesn't seem like it should be necessary to make this an absolute prohibition, however. In any case, the solution is clear: don't use SimpleContent in a table that also contains an Element or a nested relation. Thanks Richard!

  • Chapter 6, the RunScript program. I had some trouble with this program. After loading a script, the Execute button remained disabled. It was an easy fix to put btnExecute.Enabled=True at the end of the mnuFileOpenScript_Click event, but thought you'd like to know anyway. Also, since I'm new to MSDE, I wasn't aware that if you didn't specify the database in the VB connection string, that the tables in the "create db" scripts would be created in the Master database (even though the scripts said "Use Customers", for example). So I had to run the "create db" scripts twice with modifications: creating the database first (with the VB code not specifying a database in the connection string), then creating the tables (this time specifying the name of the database in the connection string). Although you did say that some tweaking would be necessary to scripts/code, it seemed like I had to do more than what I would have expected from a database programming book.

    [I generally execute a USE statement to select the database in the script code. Then you don't need to specify the database in the connect string and you can create and populate the database in one script. Create the database, execute a USE statement to connect to it, create tables in the database, and finally populate the tables. Click here to see an example that does all this in one script.]


    If you find mistakes in the book, email me.

     

 
  Visual Basic .NET Database Programming: Updates  
 
Overview Table of Contents Source Code
Related Articles Updates Amazon.com
Amazon.co.uk
 
 
 

Copyright © 1997-2008 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated