Wrox Programmer Forums
|
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 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 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?
 
Old June 10th, 2009, 09:49 AM
Friend of Wrox
 
Join Date: Sep 2008
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)
 
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
 
Old July 30th, 2009, 06:05 PM
Registered User
 
Join Date: Oct 2008
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.
 
Old July 31st, 2009, 06:40 AM
Registered User
 
Join Date: Oct 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Found it: http://social.msdn.microsoft.com/For...0-538bc21d3544
 
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.





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





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