Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#SQL-ServerMVC
Hi I'm new here and I'm new too MVC4.
 
For a project I want to connect to a SQL Server thats not local.
I'm using Visual studio 2010 and SQL Server 2008 R2 Developer.
The project is MVC4 and C#.
 
I've created a Database with SQL Server Management Studio but without tables.
Now, I figured out that I have to use an connectionString in web.config in Visual Studio. But I don't know what to fill in.. I've looked at www.connectionstring.com under SQL Server 2008. But I don't know wish one is good and what to do with an external/ remote SQL server 2008 R2!
 
And is the connectionstring the only thing to do to connect to a database?
 
Thanks in advance!
Posted 13-Nov-12 0:16am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Yes, your connection string must point to the SQL Server instance, it makes no difference if it's local, so long as the web server can see it
  Permalink  
Comments
Marcus Kramer at 13-Nov-12 16:30pm
   
+5. Not sure who the dumba** univoter is, but compensated. (I see you haven't taken long to get back into having your own personal troll. Cheers)
Nelek at 13-Nov-12 19:09pm
   
Im countering as well, ir is a quite persistent one. Seems to be looking for him the whole time.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 437
1 sanket saxena 355
2 thatraja 240
3 Abhinav S 216
4 CPallini 215
0 Sergey Alexandrovich Kryukov 8,784
1 OriginalGriff 5,025
2 Peter Leow 3,839
3 Maciej Los 3,535
4 Er. Puneet Goel 3,107


Advertise | Privacy | Mobile
Web01 | 2.8.140415.2 | Last Updated 13 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid