Hi guys,

I have worked with PHP and MySQL before and recently I wanted to try and learn ASP.net MVC since some of my friends are using it in the work place. But the most confusing thing about this is, why does all the tutorials out there not mention how to work directly with a database that is stored in SQL Server?

For example, I create a database in MSSQL 2012 using "SQL Server Management Studio" and add a database in it. I switch over to Visual Studio 2010 to create a ASP.net MVC web application. Then I look online to see how the connection part work. To my surprise, almost all tutorial covers how to create databases IN visual studio and not working with one directly stored on SQL Server.

How do you even set MVC up for this? For example, the tutorials places parts of database in the Model section of MVC, but if I want to store database on SQL Server, do I leave the database information out of the "Model" folder?

Thanks guys,

Limiter

Hi, I took a look at all those and still can't seem to solve my problem.

Basically most tutorials uses a database created INSIDE Visual Studio in .mdf format inside App_Data folder. That is not what I am doing.

I have created the database using SQL Server Management Studio in MSSQL 2012.

Then I go inside Visual Studio 2010 and create my ASP.net MVC project. I tried to connect to the database on MSSQL using various connection strings I found all over the web and none worked?

Did I miss an extra step or something?

Hi guys, going to double post here since I can't find edit post bbutton and have additional news here.

I solved the problem, apparently the problem is not connecting to SQL server but how the other code was written before the SQL part comes in. In that case, that is another question for another post.

Thanks guys,

Limiter

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.