Geeks With Blogs
finally{} My interactions with .Net and Web development - What's most important is what happens finally{}

At work I got installed the new SQL server 2005 express edition, with VS.Net 2005. Through the Visual Studio's server explorer I was unable to connect to my SQL express. After trying different things, I downloaded the SQL Server Management Studio Express CTP. But it had so many runtime bugs, that I couldn't help stop using it.

I even tried setting up the TCP/IP and NamedPipes protocol to 'enabled' in the Configuration management tool of SQL server 2005. This is done to enable remote connections.

After doing a lot of search on the internet, finally found the solution to this problem.

When you connect through the Visual Studio 2005 server explorer, you need to specify “.\SQLExpress” as the server name as opposed to “yourservername” or “(local)” or “SQLExpress”. Simple solution but bad problem.

I am on SQL server 2005 express now, right within the VStudio and the tool is damn good and fast.

Note: On a different note, SQL server 2005 has special “Xml” datatype which you can use to store XML documents, and dynamically “XQuery” them and setup relational database type of functionality. I am going to explore it now.

Posted on Wednesday, January 18, 2006 11:34 AM SQL Server/Database | Back to top


Comments on this post: SQL Server 2005 express - connection problem

# re: SQL Server 2005 express - connection problem
Requesting Gravatar...
thanks for that. im using teratrax Enterprise Manager, and it was failing the connection when set to local. now that its set as you suggested, no trouble at all...

Matt
Left by matt on Feb 27, 2006 12:04 AM

# re: SQL Server 2005 express - connection problem
Requesting Gravatar...
Brilliant! I've been trying to figure it out myself for the last hour
Left by Doogal on Mar 05, 2006 8:08 AM

# re: SQL Server 2005 express - connection problem
Requesting Gravatar...
I have created a web application in .net2005,and i am trying to connect to database to insert data,
Left by skumar on May 18, 2006 3:44 AM

# re: SQL Server 2005 express - connection problem
Requesting Gravatar...
Thank you very much. I thought I didn't configure something properly...

Left by ronin on Sep 04, 2006 10:51 AM

# re: SQL Server 2005 express - connection problem
Requesting Gravatar...
Thanks!! y lost an hour trying to figure it out...
Left by nicolas on Sep 05, 2006 7:04 AM

# re: SQL Server 2005 express - connection problem
Requesting Gravatar...
I did those things you said ,but still getting same error.
could you put your connection string.mine is below

SqlConnection cnn = new SqlConnection("Data Source=MYNOTEBOOK/SQLEXPRESS;Initial Catalog=Northwind;User ID=sa;Password=yt1234");
everything is on the same line if i try to put back slash rather than forward slash after MYNOTEBOOK i have been getting coding error.
any suggestion will be appreciated.

Left by m.aker on May 21, 2007 8:17 PM

# re: SQL Server 2005 express - connection problem
Requesting Gravatar...
Thanks a lot!!!! :) I was going nut with this sh#$@#$.
Left by Pablo on Jun 25, 2007 11:15 PM

# re: SQL Server 2005 express - connection problem
Requesting Gravatar...
When i connect remote to SQL server 2005 express SqlConnection cnn = new SqlConnection("Data Source=(servername)/SQLEXPRESS;Initial Catalog=Northwind;User ID=sa;Password=yt1234"); It 's not work.
Left by TuAnh on Sep 25, 2007 11:08 PM

# re: SQL Server 2005 express - connection problem
Requesting Gravatar...
Thank you! Now I get a different error, about the database. Progress!
Left by Peter on Feb 16, 2008 4:51 PM

# re: SQL Server 2005 express - connection problem
Requesting Gravatar...
Dude...thanks for this post. I fought with this problem & wasted my evenings study/learning time. Why is this info not prominently documented ...even MSDN didnt get me the answer. You came up on my first Google search.
cudos
Left by jltbdy on May 05, 2008 8:47 PM

# re: SQL Server 2005 express - connection problem
Requesting Gravatar...
Wow, what a gotcha. Thanks!!!
Left by James on Jun 22, 2008 9:33 PM

# re: SQL Server 2005 express - connection problem
Requesting Gravatar...
Thanks, i have been trying to figure it for some hours now
Left by iyke on Aug 18, 2008 6:52 AM

# re: SQL Server 2005 express - connection problem
Requesting Gravatar...
Thanks so much! Saved me lots of time. :)
Left by erinnv on Oct 29, 2008 7:36 PM

# re: SQL Server 2005 express - connection problem
Requesting Gravatar...
hello,
could anybody help me? i still could not access my database remotely. i have the error: application attempted to perform an operation not allowed by the security policy.
i already set my .net framework to fulltrust, but the error is still there.

thanks in advance!
Left by che on Jan 26, 2009 5:16 AM

# re: SQL Server 2005 express - connection problem
Requesting Gravatar...
Yep, tks a lot, helped me with NHibernate config
Left by Laduncaag on Mar 15, 2009 4:18 PM

# re: SQL Server 2005 express - connection problem
Requesting Gravatar...
Thanks a lot you solved my problem.Great!!!!!!
Left by Nagendra on Dec 10, 2009 12:37 AM

# re: SQL Server 2005 management stdio express - connection problem
Requesting Gravatar...
SQL Server 2005 management stdio express - connection problem
Left by israr on Dec 10, 2012 4:11 AM

Your comment:
 (will show your gravatar)


Copyright © Vinayak | Powered by: GeeksWithBlogs.net