Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET SQL
My query regarding sql database file connection with web application. In C#.net-asp.net , if I develop a web application then i need to connect sql database, there are two method to connect it .
 
1. attach database to sql server. Give id, password and server ip in connection string in webconfig file.
 
2. put the sql database file in App_Data folder, and in connection string give the path of sql database file.
 
Which one is better and why?
Difference Between both method?
(is performance of web application is effected or not in 2nd method)?
Posted 17-Sep-12 22:13pm
Comments
shabari7 at 18-Sep-12 3:19am
   
It depends on ur requirement....skim this
http://stackoverflow.com/questions/4000848/whats-the-difference-between-the-database-inside-app-data-folder-vs-connecting

1 solution

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

Solution 1

For development purpose you may go with App_Data DB(SQL Express). Lot of limitation to this:
1. CPU support is only 1.
2. Performance hit if the number of users increases.
3. Overall negative if you want to host an app like this.
 
if your model is to develop locally using SQL express, then take the DB from your App_Data folder to a full SQL server instance(I mean attach to SQL Server).
  Permalink  

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



Advertise | Privacy | Mobile
Web03 | 2.8.150327.1 | Last Updated 18 Sep 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100