Lesson 38 Build Customer Database
Page 424 has a notation box on how to build a SQL database called Customer.mdf, for people who have access to SQL Server.
The book calls it a "program", so I was expecting an .exe, but instead it is a Solution. You load the solution into Visual C#, and then run it.
That's fine, but I had to overcome a few problems. For one, when running the solution you get a text box asking where the SQL server is located, but you have to figure out that that is what the text box is asking.
It's just a text box that says "GOTHMOG./SQLExpress" , and a button labeled Create Database.
You have to figure out how to change it to the path to your own SQL server.
This may have been covered in the book before, I don't remember. But as I have SQLExpress loaded on this computer, I was able to change the path to just :
./SQLExpress
and it worked.
However, once the Customer database was created, I could not attach to it. Windows 7 gave me the error message that I did not have permission to open the file, and that I needed to contact the owner of the file.
I had to go through the complicated process of Taking Ownership of the file, and once having done that, had to Allow Full Permissions to my username.
However, after doing all this, I was still unable to attach the database. The new error was that I did not have permission to open the LOG file! I had to go back and go through the whole Take Ownership process AGAIN to give myself permission (on MY OWN COMPUTER!!) to open the database log file!!
After doing so, the database was accessible to Lesson 38, Exercise 2.
What a nightmare!
|