View Single Post
  #1 (permalink)  
Old June 7th, 2009, 04:25 PM
clay5050 clay5050 is offline
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?