Solved

Error connecting to my local sql express 2005

Posted on 2011-02-16
5
852 Views
Last Modified: 2012-05-11
I'm on xp, asp.net 3.5.  Error screen attached.  How to fix this?
Thanks.
sqlerr.JPG
0
Comment
Question by:lapucca
  • 3
5 Comments
 

Author Comment

by:lapucca
ID: 34909619
Here are my connection strings.
  <add name="core" connectionString="Data Source=.\SQLEXPRESS;user id=xxx;password=yyy;Initial Catalog=tecore_Core"/>
  <add name="master" connectionString="Data Source=.\SQLEXPRESS;user id=xxx;password=yyy;Initial Catalog=tecore_Master"/>
  <add name="web" connectionString="Data Source=.\SQLEXPRESS;user id=xxx;password=yyy;Initial Catalog=tecore_Web"/>  
0
 
LVL 9

Expert Comment

by:rawinnlnx9
ID: 34909680
try using 'local' instead of the . on my local installs I actually have named installs such as SQL2005, SQL2008, etc... When you installed did you install it as "default"? If so then simply use "Data Source=local;..."
0
 

Author Comment

by:lapucca
ID: 34909796
The original connection string used localhost.  I changed it to local and still getting the same error screen.  Thank you.
0
 
LVL 16

Accepted Solution

by:
BurnieP earned 500 total points
ID: 34912130
Hi,

What is the name of your Sql Instance?

Let's say you go into Microsoft SQL Server Management Studio, this would be the upper menu level item name.

Then modify your connection strings using this name as follow :

  <add name="core" connectionString="Data Source=SqlInstanceName;user id=xxx;password=yyy;Initial Catalog=tecore_Core"/>
  <add name="master" connectionString="Data Source=SqlInstanceName;user id=xxx;password=yyy;Initial Catalog=tecore_Master"/>
  <add name="web" connectionString="Data Source=SqlInstanceName;user id=xxx;password=yyy;Initial Catalog=tecore_Web"/>  

Replace SqlInstanceName with your name, it can be something like YourName\SQLEXPRESS, just put everything you see in uppercase.


0
 

Author Closing Comment

by:lapucca
ID: 34912326
Apparently I instlled it as a named instance.  I had to put macineName\sqlName in connection string to make it work.  It won't work with local when it's a named instance.  Thank you.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

830 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