Help needed here! Connecting to a dB on a different server!

Results 1 to 3 of 3

Thread: Help needed here! Connecting to a dB on a different server!

  1. #1
    Tony Guest

    Default Help needed here! Connecting to a dB on a different server!

    I need to connect to a database on a different server to the one running the asp. Is there anyway I can specify which server to use when using the &#039Server.CreateObject("ADODB.Connection")&#0 39 line? If so, how can I do it? Or do I need to migrate the database to the server running the asp?<BR><BR>Any help, opinions and/or comments well appreciated!

  2. #2
    Chad Franklin Guest

    Default RE: Help needed here! Connecting to a dB on a different server!

    Set up an ODBC on your computer that holds the ASP pages. Specify where the database sits. In the example below I&#039m connecting to a database that sits in North Bay and the ASP pages are running on a Toronto server.<BR><BR>&#039Connect to Database<BR>Dim Conn<BR>If IsObject(Session("Access Database_conn")) Then<BR> Set conn = Session("Access Database_conn")<BR>Else<BR> Set conn = Server.CreateObject("ADODB.Connection")<BR> conn.open "Access Database","",""<BR> Set Session("Access Database_conn") = conn<BR>End If<BR>&#037;&#062;<BR>

  3. #3
    Tony Guest

    Default RE: Help needed here! Connecting to a dB on a different server!

    Thanx Chad, fair play to yah my good man!<BR><BR>T

Posting Permissions

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