SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 connection string
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

elic05
Yak Posting Veteran

62 Posts

Posted - 11/22/2012 :  14:51:48  Show Profile  Reply with Quote
a virtual machin on a cloud host my site
the ms sql server is on the same windows server
i wrote this connection string to commubicate between the site and the sql server but its not working
Data Source=.\;AttachDbFilename=|DataDirectory|\aa.MDF;Integrated Security=True;Trusted_Connection=Yes
.\ - its the only sql server instance i have, and that the way I get to it with the management studio
and because the host and the sql server are on the same os, I thought that should be the source.
and it is in the data directory, and the name of the mdf file is aa.MDF
where is my mistake?
if there is a better place to post this question, I will be happy to know.
thanks

revdnrdy
Posting Yak Master

USA
220 Posts

Posted - 11/29/2012 :  13:46:10  Show Profile  Reply with Quote
quote:
Originally posted by elic05

a virtual machin on a cloud host my site
the ms sql server is on the same windows server
i wrote this connection string to commubicate between the site and the sql server but its not working
Data Source=.\;AttachDbFilename=|DataDirectory|\aa.MDF;Integrated Security=True;Trusted_Connection=Yes
.\ - its the only sql server instance i have, and that the way I get to it with the management studio
and because the host and the sql server are on the same os, I thought that should be the source.
and it is in the data directory, and the name of the mdf file is aa.MDF
where is my mistake?
if there is a better place to post this question, I will be happy to know.
thanks



The attachdbfilename is specific to sql express I think (not certain though). Are you using that?

Go to Top of Page

johnson_ef
Starting Member

India
16 Posts

Posted - 11/30/2012 :  04:21:41  Show Profile  Reply with Quote
Just to understand the issue clear,

Are you using connection string to connect to Existing DB or are you trying to attach a DB with a Connection string?

-Johnson
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000