Response.Redirect fails after Database Update

Results 1 to 3 of 3

Thread: Response.Redirect fails after Database Update

  1. #1
    David Forster Guest

    Default Response.Redirect fails after Database Update

    Hi folks,<BR><BR>I have a page that (amongst other things) inserts a record into my SQL Server database and then redirects the browser to another page. Problem is that the record is definitely entered, but then the browser does nothing except show me the little progress bar progressing across the status bar very slowly.<BR><BR>My code is as follows:<BR><BR>&#060;% &#039detection of users action here<BR><BR> &#039If the user is inserting a record<BR> set oConn = Server.CreateObject("ADODB.Connection")<BR> oConn.Open "dsn=news"<BR> sSQL = "INSERT INTO tbl_news (news_title, news_text, news_image, news_hyperlink, news_on) VALUES (&#039"<BR> sSQL = sSQL & Replace(Request("title"), "&#039", "&#039 + CHAR(39) + &#039") & "&#039, &#039"<BR> sSQL = sSQL & Replace(Request("text"), "&#039", "&#039 + CHAR(39) + &#039") & "&#039, &#039"<BR> sSQL = sSQL & Replace(Request("image"), "&#039", "&#039 + CHAR(39) + &#039") & "&#039, &#039"<BR> sSQL = sSQL & Replace(Request("hyperlink"), "&#039", "&#039 + CHAR(39) + &#039") & "&#039, &#039"<BR> sSQL = sSQL & Request("visible") & "&#039)"<BR> oConn.Execute sSQL<BR> oConn.Close<BR> Set oConn = Nothing<BR><BR> Response.Redirect "news_manager.asp"<BR>%&#062;<BR><BR>Any thoughts as to why the redirect doesn&#039t work???<BR><BR>Cheers,<BR>David

  2. #2
    Join Date
    Dec 1969

    Default RE: Response.Redirect fails after Database Update

    Are you testing this on a local machine or the web ? I have a problem with my site, when I access it from one of my clients lan connections the scripts on it time out. This only happens on this particular connection - nowhere else. I think it has something to do with their firewall.<BR><BR>The other thing you can try do if you have not already is rem the SQL exucute and see if it redirects then. At least you will know that is has something to do with the SQL. <BR><BR>The last possible thing that I can think of is that it is not finding the re-direct page is the spelling correct and all that.<BR><BR>Hope this was of a little help.<BR><BR>Dwane.

  3. #3
    David Forster Guest

    Default RE: Response.Redirect fails after Database Update

    Panic Over! :o)<BR><BR>I&#039ve no idea why, but I uploaded the necessary pages to my live web server and they all work fine. Before, I was using an in-house server for development use.<BR><BR>Can anyone out there explain why my dev server does not like redirecting people where my live one does??!?!?!<BR><BR>David.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts