Wrox Programmer Forums
|
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 23rd, 2004, 11:08 PM
Authorized User
 
Join Date: Nov 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to vanjamier Send a message via AIM to vanjamier Send a message via MSN to vanjamier Send a message via Yahoo to vanjamier
Default Http Header....argh, Help Help pls... ?

Hello i dun understand why it doesnt work...

[code]
<form name="form1" action="" method="post" LANGUAGE=javascript onsubmit="return form1_onsubmit()">
</CENTER>

<%
on error goto 0
Set rs = Server.CreateObject("ADODB.RecordSet")

'QueryStrings
strId = Request.QueryString("ID")

'get the selected software info
sqlstr = "SELECT " & _
        " Filename,Filesize,FileType,SwName,SwVersion,SwComp any,LicenseNumber" & _
        " ,LicenseDate,LicenseEndDate,LicenseAmount,siasid,O wnername,Owneremail" & _
        " from LicenseTab where id = '" & strID & "' "

rs.Open sqlstr, connStr

        owname = Request.Form("txtname")
          owemail = Request.Form("txtemail")
          softname = Request.Form("txtswname")
          softver = Request.Form("txtswver")
          company = Request.Form("txtcom")
          number = Request.Form("txtnum")
          serial = Request.Form("txtserial")
          date1 = Request.Form("txtdate")
          date2 = Request.Form("txtldate")

          If Request.Form("btnEdit") = "Update" Then

          Set rs2 = Server.CreateObject("ADODB.RecordSet")

              'update record
              sqlstr2 = "Update LicenseTab set" _
                      & " Ownername = '" & owname & "', " _
                      & " Owneremail = '" & owemail & "', " _
                     & " SwName = '" & softname & "', " _
                      & " SwVersion = '" & softver & "', " _
                      & " SwCompany = '" & company & "', " _
                      & " LicenseAmount = '" & number & "', " _
                      & " LicenseNumber = '" & serial & "', " _
                      & " LicenseDate = '" & date1 & "', " _
                      & " LicenseEndDate = '" & date2 & "' " _
                       & " Where id = '" & strID & "'"

               rs2.Open sqlstr2, connStr

               Response.Buffer = True
            Response.Clear
            Response.Redirect("updated.htm")
                Response.End
        End If
%>


CAN SOMEONE PLEASE HELP... ???
__________________
Education ruined me
 
Old December 24th, 2004, 12:43 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Please also check for following:

1. Are u getting data in the first recordset?
2. Instead of opening second recordset, you can use connStr.execute (where connStr is connection object).


Om Prakash
 
Old December 24th, 2004, 01:31 AM
Authorized User
 
Join Date: Nov 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to vanjamier Send a message via AIM to vanjamier Send a message via MSN to vanjamier Send a message via Yahoo to vanjamier
Default

Response object error 'ASP 0156 : 80004005'
Header Error

/itls/slid/license_mod.asp, line 85

The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.


This is the error im getting

I tried ur suggestions but still get the same error...
Anyway yesh, im getting data from the first recordset
 
Old December 24th, 2004, 04:46 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Please remove the following code:

Response.Buffer = True
Response.Clear


Om Prakash
 
Old December 24th, 2004, 04:59 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Take a look at this thread: http://p2p.wrox.com/topic.asp?TOPIC_ID=1797

I think in your code you're turning on buffering too late; You have already sent the <form> tag etc to the browser, so you can no longer turn on buffering at that point.

If I were you, I'd move all the ASP code to the top of the page, before the <html> and other tags.

Cheers and a Merry Christmas everyone,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old December 24th, 2004, 02:35 PM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Vadivel Send a message via Yahoo to Vadivel
Default

oh yeah Imar is right. You are turning on the buffer too late in your code. I guess it might work when you put the response.buffer = true above the html tag!

Best Regards
Vadivel

MVP ASP/ASP.NET
http://vadivel.thinkingms.com
 
Old January 12th, 2005, 01:02 AM
Authorized User
 
Join Date: Dec 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hai,

 i think we cannot use on error goto x in asp.

bye.

 
Old January 12th, 2005, 02:53 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

On Error Goto 0 works fine in ASP; it resets the effects of On Error Resume Next.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Hey by Pixies (Track 13 from the album: Doolittle) What's This?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Server did not recognize the value of HTTP Header ndr1977 .NET Web Services 0 May 23rd, 2008 01:50 PM
Passing values through HTTP header alexmalayil ASP.NET 2.0 Professional 3 October 27th, 2007 09:10 AM
Argh! Why does this concatenate? interrupt Javascript How-To 1 August 13th, 2005 08:44 AM
HTTP Status 405 - HTTP method GET .... nsakic Servlets 1 January 25th, 2004 04:50 PM
search with http header harpua Classic ASP Basics 3 September 9th, 2003 09:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.