Monday, February 06, 2006

Updated Source Code for "Visual Basic 2005 Database Programming"

I've uploaded to the WROX code download site a complete refresh of the Visual Basic 2005 source code for Chapters 1 through 9 of the source code files for Expert One-on-One Visual Basic 2005 Database Programming. The refresh includes source code for chapters 10 through 12, which is unchanged. The update contains fixes for code in chapters 1 through 5 that readers weren't able to open in Visual Studio 2005's Windows form designer, as well as other minor fixes. The individual chapter zip files (Chapter through have different names than the original versions, but the new contents will overwrite the original source code copied to your \VB2005DB\Chapter01 through \VB2005DB\Chapter12 folders. (Updated 2/15/2006.) Important: You must download Part 1 (57678X_code.part1.exe, 9.44 MB) and Part 2 (57678X_code.part2.rar) into the same temporary folder of your choice (e.g., C:\Temp). Then run 57678X_code.part1.exe to start the extraction process for the files into the same or another folder (e.g., C:\VB2005DB), as shown here.

Finally, extract each file to a \VB2005DB\Chapter##\... folder and subfolders by marking the Use Folder Names check box, as shown here:

Caution: If you want to save modifications you made to the original source code, please change the name of your current \VB2005DB folder before opening the files. Chapter 1's OleDbDataObjects project has a couple of problems: 1. SQL Server 2005 Express (SSX) doesn't install SQLXML 4.0, despite Adam Weiner's inference in an XMLTeam blog post that it does. Thus, I've modified the source code to CopyLocal Microsoft.Data.SqlXml.dll, which enables compiling the project when you're running SSX. The project won't run in this case, because the underlying SQLXML 4.0 COM object isn't installed. See the comments in the Main.vb file regarding changes for SSX users. There's no redistibutable for SQLXML 4.0, so you'll need to download SQLXML 3.0 SP3 from MSDN and install it, if you haven't installed the client tools for SQL Server 2005 Developer edition or higher. 2. I accidentally built the original updated version with a later version of the (8.0.50926) Visual Basic compiler than the RTM version. The later compiler is for the VB-LINQ January Technical Preview. Unless you've installed the VB-LINQ preview bits, you'll receive an error when you run the project (after making the preceding fixes, if necessary.) Here's more info on VB-LINQ. The updated version of the OleDbDataObjects.sln project from the OakLeaf FTP site includes fixes for the preceding problems. Due to the long lead time to update the WROX download site, these fixes haven't been applied to that ZIP file. If you want an updated version of the project, send me mail and I'll provide a file that contains this project only. The source code update also contains a new version of Chapter 2's ReportViewerDemo.sln WinForm project and adds a new ASP.NET 2.0 ReportViewerWebDemo WebForm project to Chapter 8. You can learn more about the new ReportViewer control for WinForms in my "Build Client-Side Reports Easily" article in the November 2005 edition of Visual Studio Magazine. Watch for the announcement of a similar article about the ReportViewer control's WebForms version. This OakLeaf Blog post has links to this and other recent VSM articles. --rj P.S.: This is a copy (with minor modifications) of the latest "Plog" post for the book to my Amazon Connect site.