Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning C# 3.0 : An Introduction to Object Oriented Programming ISBN: 978-0-470-26129-3
This is the forum to discuss the Wrox book Beginning C# 3.0 : An Introduction to Object Oriented Programming by Jack Purdum; ISBN: 9780470261293
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning C# 3.0 : An Introduction to Object Oriented Programming ISBN: 978-0-470-26129-3 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
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 7th, 2009, 04:25 PM
Registered User
 
Join Date: Mar 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ch14;get Class not register error with Code Example

hi all, I just want to say the book is great. my previous programming experience is writing about a dozen powershell scripts but this book has really exposed me to alot of different things.

I got a question that has stumped me. Im using Visual Studio 2008 and I loaded the example project Ch14CreateDatabase (I've made no changes to the original program). This is the example mentioned in Ch 14, Page 406 about creating a database. I'm stepping through the program to watch the process flow and see what gets assigned to the variables. Inside of the program, if I click "File --> New", take the deafult DB name or enter a new name, I get a "Error: Class not register". I debug the program and step through and it generates the exception in the file clsDB.cs, Line 85. Here is a snippet of the code (Line 85 is myCat.Create(newDB))
Code:
ADOX.CatalogClass myCat = new ADOX.CatalogClass();
newDB = CONNECTSTRING + combinedName + ";" + CONNECTSTRINGPART2;
myCat.Create(newDB);
myCat = null;
my gut tells me the project is not setup properly but not sure what to do. any ideas?
  #2 (permalink)  
Old June 10th, 2009, 09:49 AM
Friend of Wrox
Points: 1,166, Level: 13
Points: 1,166, Level: 13 Points: 1,166, Level: 13 Points: 1,166, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2008
Location: Indianapolis, IN, USA.
Posts: 234
Thanks: 0
Thanked 32 Times in 30 Posts
Default Database issue

While I can't be positive, my guess is that the problem arises because you didn't add a reference to the ADOX routines. Read the material on page 406 and see if the issue doesn't go away.
__________________
Jack Purdum, Ph.D.
Author: Beginning C# 3.0: Introduction to Object Oriented Programming (and 14 other programming texts)
  #3 (permalink)  
Old June 11th, 2009, 07:09 PM
Registered User
 
Join Date: Mar 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Try it out

Hi there, I tried adding the reference Microsoft ADO Ext. 2.8 for DLL and Security (in the book, page 406) but that didn't help...got the same error.

that is OK, i'm going to move on
  #4 (permalink)  
Old July 30th, 2009, 06:05 PM
Registered User
 
Join Date: Oct 2008
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This error happens straight from the downloaded sample code. I'm not sure what the cause of the issue is.
  #5 (permalink)  
Old July 31st, 2009, 06:40 AM
Registered User
 
Join Date: Oct 2008
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Found it: http://social.msdn.microsoft.com/For...0-538bc21d3544
  #6 (permalink)  
Old December 23rd, 2009, 07:17 AM
Registered User
 
Join Date: Dec 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi

I'm on 32bit (it looks like Ceromus is on 64).. and I had intellisense weirdness after adding the reference. I've also got Resharper which may have been the cause. Anyway, a quick restart of VS2008 made everything sing and dance again.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
My VB Code for Ch14 PatFrank BOOK: Beginning ASP.NET 2.0 and Databases 8 April 17th, 2007 02:34 PM
Where is promised VB app code for Ch14? PatFrank BOOK: Beginning ASP.NET 2.0 and Databases 1 March 1st, 2007 08:33 PM
Errata,Code,Ch14,ThrowExample.htm din BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 0 January 20th, 2006 05:07 AM
Code depending on Register Globals char Beginning PHP 2 July 31st, 2003 11:45 AM



All times are GMT -4. The time now is 09:07 PM.


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