开发者

What should be the Connection String of my project?

开发者 https://www.devze.com 2023-04-03 18:26 出处:网络
I have hosted a new website from www.hostingfarms.com. They have a file manager for uploading the website content and backup / restore DB (.bak) of MS SQL. I uploaded it. But when I log in into my web

I have hosted a new website from www.hostingfarms.com. They have a file manager for uploading the website content and backup / restore DB (.bak) of MS SQL. I uploaded it. But when I log in into my website (www.theyuvaworld.com), database not gets connected. I have used this connection string in my开发者_如何学JAVA local PC

SqlConnection con = new SqlConnection("server=.;database=test;integrated security=true");
SqlCommand cmd = new SqlCommand();

Should I make any changes here.

Note : I have created a user in file manager's database i.e Username = Nikhil and Password = **.

I will give any other details if wanted.

Regards,

Nikhil


I figured out this,

Connection string syntax is

data source=.\\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true
0

精彩评论

暂无评论...
验证码 换一张
取 消