Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases 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
  #1 (permalink)  
Old July 12th, 2004, 02:44 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 page

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.
  #2 (permalink)  
Old July 12th, 2004, 03:54 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: Mentiri, Muara, Brunei.
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi jayaraj,

  Wrong post. This is for classic asp. Post at Beginning ASPX



  #3 (permalink)  
Old July 12th, 2004, 07:44 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

You would have to parse it with the MSXML (or other XML) parser, or create a .NET component that accesses a configuration file, which the ASP page would access.

Brian


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET - Static Page and Dynamic Page sohrabus ASP.NET 2.0 Professional 2 April 18th, 2007 11:42 PM
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 jayaraj General .NET 1 July 12th, 2004 04:19 AM
Setting Dynamic Connection String jayaraj General .NET 1 July 9th, 2004 08:19 AM
How to create HTML page from a dynamic ASP page musharaf Classic ASP Professional 2 March 18th, 2004 09:31 PM





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