Click here to Skip to main content
12,897,914 members (78,377 online)
Rate this:
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 , 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 21:13pm
shabari7 18-Sep-12 3:19am
It depends on ur requirement....skim this

1 solution

Rate this: bad
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).

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170424.1 | Last Updated 18 Sep 2012
Copyright © CodeProject, 1999-2017
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