Solved

VS2003 ODBC SQLDatasources doesn't show SQL Server Express 2005

Posted on 2006-11-18
2
338 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
ID: 17973488
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
ID: 17973532
clockwatcher,

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

I wasn't aware of that additional step.

Joe
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
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.

863 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

20 Experts available now in Live!

Get 1:1 Help Now