|
| Configuration |
 |
Thu, 3 Apr 2008 14:36:25 +0000 |
HI,
I am doing website in asp.net for first time. Which place is the best to put all
database detail and connectivity. I am using MSSQL server .
Thanks
|
| Post Reply
|
| Re: Configuration |
 |
Thu, 3 Apr 2008 14:53:58 +0000 |
Well Web.config is the best place to put all your database connections strings.
check this:
http://www.odetocode.com/Articles/345.aspx
|
| Post Reply
|
| Re: Configuration |
 |
Thu, 3 Apr 2008 14:56:51 +0000 |
Hey Hi,
here is a sample .......this one puts the NorthWind Database in web.config
file......hope this helps
<connectionStrings>
<add name="NORTHWNDConnectionString" connectionString="Data
Source=.\SQLEXPRESS;AttachDbFilename="C:\SQL Server 2000 Sample
Databases\NORTHWND.MDF";Integrated Security=True;Connect
Timeout=30;User Instance=True"
providerName="System.Data.SqlClient"/>
</connectionStrings>
in order to do the above......
in the Database ToolBar......select connectto database and choose Microsoft SQL
Server Database File and in the next step browse to select the northwind
database from your computer......
you can specify the password or just select test connection......once succeeded
click ok to finish. now you will have your database added and you can double
click to view it,
Thanks.........hapoy coding
|
| Post Reply
|
|
|
|
|
|
|
|
|
|