Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
| Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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:59 AM
Authorized User
 
Join Date: May 2004
Location: Trivandrum, Kerala, India.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dynamic connection string 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, 04:19 AM
Friend of Wrox
Points: 1,288, Level: 14
Points: 1,288, Level: 14 Points: 1,288, Level: 14 Points: 1,288, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2004
Location: Stockholm, Sweden
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

Cross post at

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


Dear T.Jayaraj. dont do this !


cheers (:_:)



Numan
--------------------------------------------------
Love is the most beautiful thing of this world. So do this !




Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection String error in ASP picky Classic ASP Databases 1 October 19th, 2007 07:37 AM
ASP connection string not working codehappy Classic ASP Basics 2 May 18th, 2005 08:43 AM
Dynamic Connection Sting from ASP jayaraj ASP.NET 1.0 and 1.1 Professional 1 July 12th, 2004 07:49 AM
Dynamic connection string from ASP page jayaraj Classic ASP Databases 2 July 12th, 2004 07:44 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.