Click here to Skip to main content
15,884,838 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I am using .\Sqlexpress as my instance in the connection string.
But I want to use .\MyApp as new instance. My issues are:

1) When I install application on the new computer, does use manually needs to make this instance and attach database to it? Could any body give me code for it so my installation performs this fucntion.

Thanks
Posted

1 solution

What difference does the instance name make? Are you expecting users to open SQL Manager and look at the data?

http://msdn.microsoft.com/en-us/library/ms143722(v=sql.90).aspx[^]
 
Share this answer
 
Comments
Furqan Sehgal 14-Jan-12 1:59am    
Hi,
I used my connection string as
Data Source=.\SQLEXPRESS;Initial Catalog=dbTestSharing;Integrated Security=True

On development computer it works fine. But when I made setup (using Visual Studio) and installed on my home computer, it says

"Can not connect the database dbMyTest requested by the login, the login failed.
Login failed for user p4\admin"

My questions are:
1) I did not include the database to setup. Do I need to do so?
2) Does my user need to make servers and instances when SQL Server to run my application?
I installed another application based on SQL Server Express, that did not have anything like that.

Please guide.
[no name] 14-Jan-12 9:08am    
Of course you need to include the database. Do you think it happens by magic?
Furqan Sehgal 16-Jan-12 2:03am    
good answer.... Thanks. Though it is a taunt, but cleared my concept

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900