Friday, February 24, 2012

Can't connect to the database using c# express and SQL 2005 Express

Hi

I'm trying to connect to the northwind database thats available online using c# and SQL 2005, both express editions. i used the following command

sqlcmd -S yourServer\SQLExpress -E -iinstnwnd.sql

and it connects to the northwind database. but when it comes to the part where i have to select the data source, there are only 2 available - microsoft access database file, microsoft SQL server database file. but according to the microsoft books that i'm following, there should also be a "micosoft SQL server" in the data source list. because of this i cant connect to the database.

Please help...

thank you

Please verify that you have SQL Server Installed, and it is a running service.

Go to [Control Panel], [Administrative Tools], [Services]

Look for a SQL Server service -most likely MSSQL$SQLEXPRESS

|||

hi,

all the Express version of Visual Studio only allow connections to SQL Server databases in User Instance scenario.. this is true for the VS wizards only, where you can connect to "traditional" SQL Server instance's databases via code..

regards

|||

thanks a lot guys

No comments:

Post a Comment