Wrox Programmer Forums
|
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 8th, 2006, 02:02 PM
Authorized User
 
Join Date: Apr 2006
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default Where is forum for ...

Where is the book forum for Beginning Visual Basic 2005 Databases.

My problem is with the sample program in Chapter 5, pg 77, Item number 10 -

'Close the connection
objConnection.Close()

When running the book's program an error generates when the 'Close' button is clicked more than once. Page 81 states that "calling the Close method on a connection that is already closed does not produce and error. Error displayed i Visual Studio Standard 2005 is "NullReference Exception error unhandled" - "Object reference not set to an instance of an object."

Any ideas as to why?
 
Old July 10th, 2006, 03:48 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Just prior to the .Close statement, find out what the object is. Either Debug.Print TypeName(objConnection) or MsgBox TypeName(objConnection).

If the value is equal to "Nothing", then the object has not been set to anything, and you’ll need to track that down..





Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I creat a forum like P2P Forum? pcassiano ASP.NET 1.0 and 1.1 Basics 1 October 31st, 2005 05:00 AM
Forum Help torch BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 2 June 12th, 2005 12:22 PM
Which Forum? fishypew SQL Server 2000 1 May 12th, 2005 09:52 AM
converting Forum.aspx to Forum.ascx (help) drfunkie BOOK: ASP.NET Website Programming Problem-Design-Solution 1 July 11th, 2003 12:27 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.