Click here to Skip to main content
15,883,818 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
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
Comments
[no name] 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

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).
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900