IIS ASP - Re: Need Help. - Can't find my error

This is Interesting: Free IT Magazines  
Home > Archive > IIS ASP > July 2006 > Re: Need Help. - Can't find my error





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: Need Help. - Can't find my error
Dave Anderson

2006-07-25, 7:21 pm

Gaby wrote:
> Heres the simplified version of the code...


I have a few observations, some of which are unlikely to be the problem.
Nevertheless, I offer them:



> 01. <input type="checkbox" id="1_AbleToGiveOrders"
> name="1_AbleToGiveOrders" value="1">
> <label for="AbleToGiveOrders">Able to give orders</label>


Your FOR attribute value does not match your ID attribute value, in
violation of the HTML specification:
http://www.w3.org/TR/html401/intera...s.html#adef-for

Furthermore, your ID attributes do not conform to the requirement that they
begin with a letter:
http://www.w3.org/TR/html401/types.html#type-id

These are repeated with questions 2-5.



> <INPUT TYPE="submit" value="Submit" name="Action" />


More of a warning than anything, but you might want to avoid using the name
"Action" here, as it can lead you into a troubleshooting nightmare if you
confuse form.Action with form.action.



> On Error Resume Next


If you insist on using this, make sure to check the Err Object
(http://msdn.microsoft.com/library/e...3f8082fdbfe.asp)
at strategic places:

conn.open strConn
If Err.Number > 0 Then
Response.Write("Problem connecting!")
...
Err.Clear
End If



> <input type="text" size="12" maxlength="6" name="roster"
> id="roster"> <--- I have taken this out of sequence
> n1 = clng(Request.Form("Roster"))


If you have not validated the contents of Request.Form("Roster").Item, then
CLng is prone to failure. Ditto for CInt further down.



> conn.qInsertRecord n1, n2, n3, n4, n5, p1, p2, p3, p4, p5


You never reached this point, IMO.



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


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com