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 2008 Forums
 Other SQL Server 2008 Topics
 C# and sqlserver - help

Author  Topic 

Reut_sit
Starting Member

2 Posts

Posted - 2009-04-01 : 07:38:09
hi ,
i am trying to connect from my computer to sqlserver 2008 express
db that is also on my computer .

i am a bit confuesed and i have a few problems :
1.i look: at http://www.connectionstrings.com/sql-server-2008#1
what should be the user name and the password ?
the connect string that i wrote is :
@"Data Source=localhost;Initial Catalog=C:\Users\REUT\Documents\VAFDB.mdf;User Id=sa;Password=logic ;";

2. while i create the *mdf file ,it was created at other library then the sqlexpress is installed - is that all write ? or should it be at the same library as the sql server ?

3. what else should i do so i will be able to do the
myConnection.Open(); ?
when i look at the sqlserver configuration manager i saw that the sqlserver is running , but the sqlserver agent is stoped -is it ok ?

Thanks ,
reut
   

- Advertisement -