Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 Connection String problem

Author  Topic 

FrenkyB
Starting Member

3 Posts

Posted - 2008-09-22 : 10:55:21
Hello,

I've created application in Visual Studio.net 2008. I've created database (.mdf file) with sql server express. I've attached database with sql server management studio and then run my appication. My connection string was:

<connectionStrings>
<add name="Zapori_Data.Properties.Settings.ConnectionString"
connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=Zapori;Integrated Security=True;Connect Timeout=30;User Instance=False"
providerName="System.Data.SqlClient" />
</connectionStrings>


Everything worked fine!

Then I've moved application to another computer - nad I've got error:

"Cannot open database "Zapori" requested by the login. The login failed. Login failed for user "FRENKY-B\Frenky".

What should I do? What is wrong. I've attached database with sql server managemnet studio express on that other computer.


Greetings, Frenky

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-09-22 : 11:02:04
You are using SSPI.
Have you added your user account to the new database server?


E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

FrenkyB
Starting Member

3 Posts

Posted - 2008-09-22 : 16:03:25
Uf... I didn't. I don't know how to do ti. I am using Sql server 2005 and sql server managament studio express.
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-09-22 : 16:14:37
You have to set this to the instance name on the target computer. With the correct connection parameters

.\SQLEXPRESS;Initial Catalog=Zapori;Integrated Security=True;Connect Timeout=30;User Instance=False"
Go to Top of Page

FrenkyB
Starting Member

3 Posts

Posted - 2008-09-23 : 01:33:49
I already have .SQLEXPRESS in my connection string, doesn' help.
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-09-23 : 04:11:53
quote:
Originally posted by FrenkyB

I already have .SQLEXPRESS in my connection string, doesn' help.



No what am asking is what is the name of the installation of SQLExpress on the target machine ???
Go to Top of Page
   

- Advertisement -