Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've eveloped and application using C# and Sql Server 2005 Express. I try to run the application on other computers. I install .Net everything's ok, when I try to install SQLEXPRESS three cases happen: 1. In most copmuters it doesn't install and generates some kind of error! 2. When it is installed and I run the application and exception happens saying SQLExpress could not make connection, connect Microsoft site. 3. Rarely it works!

Do you guys have the same problem? What should I do to make my application runnable on all computers? What should I do with

share|improve this question

migrated from stackoverflow.com Nov 7 '10 at 8:13

This question came from our site for professional and enthusiast programmers.

I have installed SQL server express at least 50 times on different computers without the installation failing me once. Regarding the connection issue, you know that you have to add \SQLEXPRESS at the end of the server name/ip to successfully connect to a SQL express server? –  Øyvind Bråthen Nov 7 '10 at 7:36
This question concerns installation issues and should be asked on www.serverfault.com. –  Pieter van Ginkel Nov 7 '10 at 7:37
I think we need a little more information. Regarding #1 before being able to help, you'd need to describe the installation error (see support.microsoft.com/kb/955396). For #2, what is the instance name of the SQL Server on your dev machine? Is it the same on other machines? Does your application allow choosing connection information or is this hardcoded? –  jveazey Nov 7 '10 at 7:42
@Øyvind Bråthen: yes I do add it at the end of my string. @John: the error message is: Connections to Database file (*.mdf) require Sql Server 2005 Express to function properly! You see I even try to add "Service-base Database" in Solution Explorer, the same error appears. I'm trying it on Windows XP and it is "Microsoft Sql Server 2005 Express " –  Mohammad Aliannejadi Nov 7 '10 at 7:56
This is what I dislike about the MS approach to light databases: they require installs. If you use SQLite you won't have to worry about installing the database at all. Just a suggestion, not an actual answer. –  jcollum Dec 19 '10 at 21:08

1 Answer 1

As others have said, answering numbe 1 will require some more information from you.
It sounds like you are tying to make use of "user instances". Which is the default way Visual Studio connects to a database when you add it to your project. This is a feature that means your connection string points to a .mdf file. When you connect to this, sql server has to attach that file. This is normally an action that only an admin can perform, user instances allows anyone to do it. Searching for user instances will probably let you find extensive documentation on troubleshooting it. However I found a forum post that includes the SQL to run to enable the feature.
If this isn't the issue then if you could update your question to include the complete error you get someone may be able to help you further.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.