Click here to Skip to main content
15,901,283 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am testing an application. In tableadapter configuration wizard, On server side:
While choosing data source, I chose Microsoft SQL Server Database File.
This gave set the connection string as:

VB
Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database1.mdf;Integrated Security=True;User Instance=True


Is this correct?
Any way this works in my desired way.

Then in SQL Server Mgmt Express, I attached the database to the instance of my SQL Server Express (to MyhomeServer\SQLExpress"

Now I want to use the same application on Client side (off course databse is stored in Data Directory of my application in Server Side) Now in tableadapter wizard, I choose Microsoft SQL Server Express. Is that correct?
I have done all configurations for remote connection etc. and also done the firewall settings. When I run this test on client side, it returns error:
Cannot open database "Database1.mdf" requested by the login. The login failed. Login failed for user 'MYHOMESERVER\Kh. Furqn'.

Why does it go to Kh. Furqan while I am giving it SQLExpress, where the DB is attached. My server is MyHomeServer\SQLExpress and connection is MyHomeServer\Kh. Furqan (Authentication is Windows Authentication, and no password for it)

Thanks
Posted
Updated 29-Jan-12 0:37am
v2

1 solution

 
Share this answer
 
Comments
Furqan Sehgal 29-Jan-12 8:12am    
I tried this but I donot understand why Login failed. The integrated security is true and I am using Windows Authentication

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