redirection not working

R

redirection

Hey

I made a lil program to where if a certain server is down i can redirect all the traffic to another server. I can goto this secure page, type in some info and it changes this one field

My thought is that this page (below) reads where the "place" is. If the thing it calls is a "1" than it will goto this page, and any other character will goto the other pages. The problem with this is for some reason the code isnt workign below. I think i have all the logic. When i put all this info in the page and upload it just sits there. Am i missing something. All i want this page to do is look at database, check which value is in the page, and than it will redirect the people to the appriopate page

Any feedback/help would be great

Thanks!

<
Response.Expires = -1000 'Make sure the browser doesnt cache this pag
Response.Buffer = True 'enables our response.redirect to wor

Sub RedirectPlace
Dim myconn, objRS, ecom, blnLoggedI
Set myconn = Server.CreateObject("ADODB.Connection"
myconn.open = "Provider=SQLOLEDB.1;Password=XXX;Persist Security Info=True;User ID=XXX;Initial Catalog=XXX;Data Source=XXX.XXX.XXX.XXX

ecom =

Set objRS = myconn.execute("SELECT place FROM redirection_switch WHERE name='" & "Test" & "';"

If objRS.EOF Then '''NO RECORDS MATCH. USER DID NOT LOG IN CORRECTL
Response.Redirect "http://www.downloads.com
Els
If objRS("place") = ecom Then '''NO RECORDS MATCH. USER DID NOT LOG IN CORRECTL
Response.Redirect "http://www.microsoft.com
Els
Response.Redirect "http://www.cnn.com

objRS.Clos
Set objRS= Nothin

myconn.clos
set myconn = nothin
End I
End I
End Su
%>
 
R

Roland Hall

in message
: Geez im an idiot the MINUTE i posted it i found the problem! I kept the
sub routine in there, once i removed it, the thing works like a charm!

Really? None of us have ever felt like idiots or found the answer, at the
speed of light, after clicking send to post to a NG for assistance. You
must be unique. (O:= *BAG*
 
D

Dave Anderson

Roland said:
None of us have ever felt like idiots or found the answer,
at the speed of light, after clicking send to post to a NG
for assistance.

Certainly not a colleague of mine who calls it "debugging by confession".



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top