MS SQL Server - How to find a connection string

I've got SQL Server 2005 Express installed on my computer and am trying to figure out what the connection string would be that I need to use in order to connect to it from an ASP.NET application.  I known that I cannot connect to a SQL Server Express database over a network from a different computer, but I want to be able to connect to it locally as part of a testing environment.

Is there a way in SQL Server Management Studio that I can find out what the connection string would be to a particular database?
josephdaviskcrmAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jmoss111Commented:
Hello josephdaviskcrm,

Look at www.connectionstrings.com

Regards,

Jim
0
lotusnotesnewbieCommented:
Your
If server is in local simply use .
connectionString="Data Source=<servername>\SQLEXPRESS;Initial Catalog=<database name>;User ID=sa;Password=<pwd>" providerName="System.Data.SqlClient" />
Or you can create a empty aspx page. Drag and drop SQLDataSource from Toolbox->Data click on New connection follow the wizard which will generate the connection string for u.
 
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Marten RuneSQL Expert/Infrastructure ArchitectCommented:
Not your question but...
Quote: "I known that I cannot connect to a SQL Server Express database over a network from a different computer"

This opinion of yours needs to be updated. Of course you can connect to a SQL Express from another computer. It's just not on by default.

Go to: Programs/Microsoft SQL.../Configuration tools/SQL Server Configuration manager
Enable TCP/IP, and if you like Named pipes (needs a really stable and fast network).
I often exclude the named pipes

/Marten
0
josephdaviskcrmAuthor Commented:
lotusnotesnewbie:
That connection string you provided doesn't seem to work.  When I try to set up a connection with the SqlDataSource web control, the wizard says that it is able to connect to the database when I click on 'test connection', but when I hit ok to finalize it Visual Studio throws an error and I am never able to see the connection string.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.