Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Databases Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 8th, 2006, 03:02 PM
Authorized User
 
Join Date: Apr 2006
Location: Virginia Beach, VA, USA.
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?
Reply With Quote
  #2 (permalink)  
Old July 10th, 2006, 04:48 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
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..
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 01:22 PM
Which Forum? fishypew SQL Server 2000 1 May 12th, 2005 10:52 AM
converting Forum.aspx to Forum.ascx (help) drfunkie BOOK: ASP.NET Website Programming Problem-Design-Solution 1 July 11th, 2003 01:27 PM



All times are GMT -4. The time now is 02:21 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.