Results 1 to 2 of 2

Thread: redirectional ASP

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    4
    I tried to post this yesterday, but I don't see it on the board, so I must've lost it. Sorry if this is redundant.

    I'm trying to ensure I've set this up correctly. This is part 2 of my problem.

    I want to have a generic tool to extract from a URL page from my site to check a dataTable to extract the redirect URL (string)
    My MS SQL database DSN:"MySQLDatabase", Table "MySQLTable",
    Column="redirectedURL"
    I will parse from URL.
    http://www.mysite.com/page5.asp?myurlredirectstring

    Myproposed.ASP
    <%
    Dim Conn, rsRedirect, redirectedURL

    SET Conn=Server.CreateObject("ADODB.Connection")
    Conn.Open "MySQLTable"

    Set reRedirect=Conn.Execute("Select redirectedURL FROM MySQLTable where Column1='somestringvalue'")

    Response.Redirect( redirectedURL)
    %>

    I think I need to conn.close ? and do I need some user/password to access?

    Thanks in advance.

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Just sone thing to point out in case you forgot - if you're using response.redirect then the first line of your page should be response.buffer = true.
    Harry.

    "From one thing, know ten thousand things."

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