#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Location
    Norway
    Posts
    57
    Rep Power
    13

    Response.Redirect error "object required"


    Hi

    When I try to use the response.redirect or response.cookies I get an error saying "object required". I`ve tried to write response.buffer=true with no luck.

    May this occur due to bad config og iis 5.0?

    Freddy
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2001
    Location
    NJ
    Posts
    428
    Rep Power
    17
    How about a code sample here?
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Location
    Norway
    Posts
    57
    Rep Power
    13
    here it is...

    Code:
    Set conn = Server.CreateObject("ADODB.Connection")
    conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & "thepath.mdb"
    Set rs = Server.CreateObject("ADODB.Recordset")
    
    if Request.Form("ny_post")="lagre" then
    
    header=replace(Request.Form("header"),"'","''")
    tekst=replace(Request.Form("tekst"),"'","''")
    
    dato=hentDato()
    klokken=hentKlokken()
    
    sql="insert into nyheter (header,tekst,dato,klokken) values('" & header & "','" & tekst & "','" & dato & "','" & klokken & "')"
    set rs=conn.execute(sql)
    
    response.redirect("default.asp")
    
    end if

IMN logo majestic logo threadwatch logo seochat tools logo