redirection not working

Discussion in 'ASP General' started by redirection, May 20, 2004.

  1. redirection

    redirection Guest

    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
    %>
     
    redirection, May 20, 2004
    #1
    1. Advertising

  2. redirection

    Roland Hall Guest

    "Redirection" wrote in message
    news:...
    : 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*
     
    Roland Hall, May 20, 2004
    #2
    1. Advertising

  3. Roland Hall wrote:
    >
    > 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.
     
    Dave Anderson, May 20, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    0
    Views:
    315
  2. ODAN
    Replies:
    5
    Views:
    455
  3. studen77

    FormsAuthentication Redirection NOT WORKING!!

    studen77, Jan 1, 2005, in forum: ASP .Net Security
    Replies:
    1
    Views:
    153
    Paul Glavich [MVP ASP.NET]
    Jan 2, 2005
  4. Hongyu
    Replies:
    2
    Views:
    159
  5. Replies:
    1
    Views:
    98
    Otto Lang
    Oct 11, 2006
Loading...

Share This Page