 |
| 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
|
|
|
|

December 23rd, 2004, 11:08 PM
|
|
Authorized User
|
|
Join Date: Nov 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

December 24th, 2004, 12:43 AM
|
|
Friend of Wrox
|
|
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
|
|
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
|
|

December 24th, 2004, 01:31 AM
|
|
Authorized User
|
|
Join Date: Nov 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

December 24th, 2004, 04:46 AM
|
|
Friend of Wrox
|
|
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
|
|
Please remove the following code:
Response.Buffer = True
Response.Clear
Om Prakash
|
|

December 24th, 2004, 04:59 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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.
|
|

December 24th, 2004, 02:35 PM
|
|
Friend of Wrox
|
|
Join Date: Dec 2004
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

January 12th, 2005, 01:02 AM
|
|
Authorized User
|
|
Join Date: Dec 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hai,
i think we cannot use on error goto x in asp.
bye.
|
|

January 12th, 2005, 02:53 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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?
|
|
 |