Solved

VS2003 ODBC SQLDatasources doesn't show SQL Server Express 2005

Posted on 2006-11-18
2
333 Views
Last Modified: 2012-06-21
I'm using VS2003, writing in C++.  I have SQL Server Express 2005 and SQL Server Management Studio Express installed.  SQL Server Management Studio express can connect to MyMachine\SQLEXPRESS using windows authentication.  I have C# code using (local)\SQLEXPRESS on this machine.

In C++, when I call SQLDataSources (SQL_FETCH_FIRST, SQL_FETCH_LAST) to enumerate the servers available on my machine, I see
    Visual FoxPro Tables
    Visual FoxPro Database
    MSSQL$VSdotNET
    Xtreme Sample Database
    Xtreme Sample Database 2003
    Xtreme Sample Database 2005

As near as I can tell, the ODBC driver for SQL Server Express 2005 is installed -- I've installed the Microsoft SQL Server Native Client (sqlncli.msi) and it claims to have installed successfully.  

Yet I can't enumerate it.

What am I missing?

Thank you.
0
Comment
Question by:josgood
2 Comments
 
LVL 25

Accepted Solution

by:
clockwatcher earned 250 total points
Comment Utility
Do you have an ODBC sql data source setup?   Open up the Control Panel, Administrative Tools, Data Sources and add a DSN to your SQL server database-- System DSN,  Add...,  SQL Server, Finish... enter the name you want for your data source, select your Server instance, Next, select the database you want to associate the data source with and then finish.
0
 
LVL 13

Author Comment

by:josgood
Comment Utility
clockwatcher,

Thank you, thank you, thank you!  That is exactly the solution!

I wasn't aware of that additional step.

Joe
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now