View Single Post
  #2 (permalink)  
Old December 8th, 2013, 07:34 PM
Rod Stephens's Avatar
Rod Stephens Rod Stephens is offline
Wrox Author
Points: 3,166, Level: 23
Points: 3,166, Level: 23 Points: 3,166, Level: 23 Points: 3,166, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jan 2006
Location: , , .
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts

Hi Wendel,

Unfortunately database programming is very common so Microsoft seems to think they need to change how it works constantly to make things better. (I also think they rename things to make you feel like the new version of Visual Studio or Windows or whatever is new so they can try to make you get a new version every 2 years.) All of that makes it hard to write (or follow) perfect instructions.

After browsing MS help I discovered that “…In the Visual Studio express products, this window is named “Database Explorer”. In all other Visual Studio products, this window is named “Server Explorer”….” That solved one problem.
Perfect example. They rename things and move them around in different versions and different editions. Sorry about this was hard to find.

I ran the program “BuildCustomerDatabase” (as per note on p424) using:
a) GOTHMOG\sqlsexpress threw an “error opening database” “…the server was not found or was not accessible…”
GOTHMOG is the name of my server. You need to use SQL Server's tools to start your server and create a database on it.

b) ./SQLExpress threw an “Error opening database” “..The server was not found or not accessible.Verify that the instance name is correct and that SQL Server is configured to allow remote connection …...”
I think that should work for SQL Server Express. But it sounds like you have the real SQL Server installed and that's different (although similar).

c) .\sqlexpress & \sqlexpress & SQLEXPRESS had similar outcome.
The “Add Connection” in my Database Explore is different in appearance to that in Figure 38-4. I do not have a “Server Name”.
I'm not sure which combinations should work. I don't think it is case-sensitive so at least that shouldn't be an issue.

1) How can I “Create Database” using BuildingCustomerDatabase.
At this point, it mat be easiest to search for SQL Server 2008 information that explains how to create a database. Then you can try to write a program to connect to it.

After you create the database, you should be able to see it in Database Explorer and make a connection to it.

2) I am unable to successfully run any of your downloads in Lesson 38??
I don't think you'll be able to run those programs until you create a database and change the name from GOTHMOG to whatever is appropriate for your system.

3) What have I missed? Lots I presume.
The real key is creating the database. I know from painful experience what a confusing mess all that is. And the SQL Server tools are not great.

Here's a page that explains how to create a database with the Management Studio tool. (You might need to install that tool separately. It's a Microsoft download and if I remember correctly the installation isn't too bad.)
How to: Create a Database (SQL Server Management Studio)
Here's a YouTube video showing how to build a database and table.
SQL Server 2008 - Create Database and table
It also uses SQL Server Management Studio. You can download it here if you need it:
SQL Server 2008 Management Studio Express
At least I think that version should work.

Sorry this is such a confusing pain. Keep us posted on your progress!

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)