Results 1 to 2 of 2

Thread: change the loaction of the database without re-programming the web-application!?!

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2002
    Location
    England
    Posts
    9

    Question change the loaction of the database without re-programming the web-application!?!

    how do i allow the the database server (which may be on a different server to the web server) be able to change without re-programming of the web application?

    at the moment i have a global.asax:


    Code:
    <%@ Import Namespace="System.Net" %>
    <script runat="server">
    Sub Session_OnStart()
    Session("conClasf") = _
    "Data Source=localhost;Integrated Security=SSPI;" & _
    "Initial Catalog=Database"
    Try
    Session("hostname") = _
    Dns.GetHostByAddress(Request.UserHostAddress).HostName
    Catch ex As Exception
    Session("hostname") = Request.UserHostAddress
    End Try
    End Sub
    </script>


    ?
    bernie

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    You'd have to change the connectionstring that you use which looks like it is stored in your session variable named "conClasf". You should these questions in the ASP.NET forum.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width