PDA

Click to See Complete Forum and Search --> : redirectional ASP


bbarnum
Aug 8th, 2000, 11:06 AM
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.

HarryW
Aug 8th, 2000, 11:12 AM
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.