Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 12th, 2004, 03:50 AM
Authorized User
 
Join Date: May 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dynamic Connection Sting from ASP

Hi,

   We put the connection string in Web.config file and invoking the connection string using this System.Configuration.ConfigurationSettings.AppSett ings.Get("DSN")
in ASP.Net.

Web.config:-

<configuration>
<appSettings>
        <add key="DSN" value="workstation id=APLNSERVER;packet size=4096;user id=sam;data source=APLNSERVER;persist security info=True;initial catalog=AHDB;password=nicuser"></add>
        <add key="DSN_ASP" value="DRIVER={SQL Server};SERVER=aplnserver;UID=nicuser;PWD=nicadmin ;DATABASE=AHDB"></add>
</appSettings>


 Is it possible to access the web.config file from AsP page?

Because In the ASP.net application contains Asp page, from that

Asp page we connect the database using connection string as directly. but actually want to access it as dynamically.

With regards
T.Jayaraj.
 
Old July 12th, 2004, 07:49 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

http://p2p.wrox.com/topic.asp?TOPIC_ID=15953





Similar Threads
Thread Thread Starter Forum Replies Last Post
dynamic database connection lisav ADO.NET 2 July 28th, 2007 05:02 PM
Dynamic connection string from ASP page jayaraj Classic ASP Databases 2 July 12th, 2004 07:44 AM
Dynamic connection string from ASP jayaraj General .NET 1 July 12th, 2004 04:19 AM
Setting Dynamic Connection String jayaraj General .NET 1 July 9th, 2004 08:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.