Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++ 2005
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Visual C++ 2005 For discussion of Visual C++ 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ 2005 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
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 30th, 2013, 09:15 AM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2013
Location: Chicago area
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Red face Registering a ODBC database.

I am learning C++ using Visual Studio 2005 and the book “Beginning Visual C++ 2005” by Ivor Horton. I run windows XP on my machine. By reading the book I have learned about object programming: Classes, class inheritance, constructors, destructors, virtual functions etc. I have also learned a lot about MFC programming. In the book, I have gotten to the part about SQL and relational databases. In the book there is a program example using the Northwind sample database. Per the authors instructions I have down loaded SQL Server 2000. He said that all the installation instructions are found on the download website (I followed the instructions, but am not sure I did everything right). I ran the setup.exe for SQL Server 2000. I needed to supply a password and had to run it using the command prompt: C:\<file path>\setup.exe sapwd=”<password>”. It ran fine.

I then downloaded the SQL Server 2000 version of the Northwind database.

The next step in the book is to register the ODBC data base. I clicked on the ODBC icon in the control panel and got the “ODBC Data Source Administer” dialog window. The book then told me to register the database as a User DSN. So I clicked on that tab. The next step was to click the “Add” button. Before I clicked the add button, I was given three choices: dBase Files with the Microsoft dBase Driver (*.dbf); Excel Files with the Microsoft Excel Driver(*.xls); or MS Access Database with the Microsoft Access Driver(*.mdb). I am not using Excel or Access, so I chose the Microsoft dBase Driver.
The next dialog I got had the title “Create New Data Source”. Here I had to select a driver. “SQL Server” made the most sense to me, so I selected that. When I clicked finish, I got the “Create New Data Source to SQL Service” dialog window. It asked for name, description, and SQL Server. I entered Northwind for the name and description. It did not give me any choices for the SQL Server. I do not know what to enter for that.

I am not sure that I have done all the steps properly, and I searched the internet for answers. There is a lot of technical terminology that I do not understand. I would appreciate it if someone could walk me through this.

*One concern I have is that non of the dialog windows asked for the dataset name for the Northwind database.
*One thing I noticed is that after I did all of the above stuff and rebooted the computer there is a icon in the lower right of my screen. When I hover the mouse over it, I see the message “Running - \\XPS410 – MSSQLServer”. Then I right clicked the icon, selected about, and got “Microsoft SQL Server Service Manager, Version 8.00.760, Copyright 1991-2000.
Reply With Quote
  #2 (permalink)  
Old September 12th, 2013, 06:43 AM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2013
Location: Chicago area
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default I made some progress

I decided not to use SQL Server 2000. Instead I used SQL Server 2005 Express. SQL Server 2005 Express was much easier to install since it had a GUI interface. When using the “ODBC Database Source Administrator”, I got to the “Microsoft SQL Server DSN Configuration” window. When I clicked next I got the follow message:

Connection failed:
SQLState: '08001'
SQL Server Error: 2
[Microsoft][SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [2].
Connection failed:
SQLState: 'HYT00'
SQL Server Error: 0
[Microsoft][SQL Native Client]Login timeout expired
Connection failed:
SQLState: '08001'
SQL Server Error: 2
[Microsoft][SQL Native Client]An error has occured while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.

I looked at the documentation on the internet for this type of problem. All of it talks about how to allow remote connections. I do not have any remote connections. I just have one stand alone PC. I did all that stuff to allow remote connections any ways to see if that helped. It did not. Does anyone have any ideas?
Reply With Quote
Reply


Thread Tools
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
Registering checked checkboxes in a database KeviJay VB Databases Basics 4 May 14th, 2008 04:44 PM
dynamic menus off odbc database sionsolo42069 ASP.NET 2.0 Professional 5 March 20th, 2006 11:33 PM
ODBC link to SQL database from Access mlwallin SQL Server 2000 2 January 24th, 2005 04:30 PM
ODBC Default Database peace Access VBA 0 September 25th, 2004 04:45 PM
ODBC Default Database peace Access 0 September 25th, 2004 04:32 PM



All times are GMT -4. The time now is 10:39 PM.


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