By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,112 Members | 1,642 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,112 IT Pros & Developers. It's quick & easy.

Need Help. - Can't find my error

P: n/a
Hi guys,
I have this ASP code that is a little long to post so but you can
download it off of
http://whatthedeuce.net/Form.asp

I cant find out what my error is. I know it is not in my Access
because I have tested my query and it works fine. but whenever i try
to submit from the page the imformation doesnt go thorugh. on a side
note, if i hit refresh it tells me it cannot refresh without sending
the information. i dont know if this would help any. please help me
if you guys can. i need this for a very important research project at
my university.

Thanks again,
Gabriel

Jul 25 '06 #1
Share this Question
Share on Google+
28 Replies


P: n/a
Gaby wrote:
Hi guys,
I have this ASP code that is a little long to post so but you can
download it off of
http://whatthedeuce.net/Form.asp

I cant find out what my error is. I know it is not in my Access
because I have tested my query and it works fine. but whenever i try
to submit from the page the imformation doesnt go thorugh. on a side
note, if i hit refresh it tells me it cannot refresh without sending
the information. i dont know if this would help any. please help me
if you guys can. i need this for a very important research project at
my university.
You would be better off creating a small repro page that we can run
ourselves. Strip out everything that is not related to the symptom you are
experiencing and post it here. Provide details abot the database tables and
queries.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 25 '06 #2

P: n/a
Heres the simplified version of the code. I will only include the code
showing five questions, when the real one has over 120.....
--

<HTML>
<HEAD>
<TITLE>Survey: Traits and IT </TITLE>
<Style type="text/css"body { Color: black; background: 99CCFF; }
body { margin-left: 5%; margin-right: 5% }
h1 { margin-left: -8%; }
h2, h3, h4, h5 { margin-left: -4% }
h2 { margin-top: 8em; margin-bottom: 3em; }
p { text-indent: 2em; margin-top: 0; margin-bottom: 0; }
body { font-family: Arial, sans-serif; }
h1, h2 { font-family: Arial, Verdana, sans-serif; }
div.box { border: solid; border-width: thin; width: 100% }
div.color { background: rgb (204, 204, 255); padding: 0.5em; border:
none ; }
</Style>
</HEAD>
<BODY>
<FORM name="frmtrial_IPC" method="post" action="FormResponse.asp">
<P>The following is the draft for a survey page.</P>
<br>
<Select name="Instructor">
<option value="" selected>Select Instructor</option>
<option value="Ammons">
Ammons</option>
<option value="Norton">
Norton</option>
<option value="OTHER">
Other</option>
</Select>
&nbsp; &nbsp;
<Select name="Semester">
<option value="" selected>Select Semester</option>
<option value="Spring2006">
Spring , 2006
</option>
<option value="SummerI2006">
Summer I , 2006</option>
<option value="SummerII2006">
Summer II , 2006</option>
<option value="Fall2006">
Fall , 2006</option>
</Select>
Class Roster #: <input type="text" size="12" maxlength="6"
name="roster" id="roster">
<br>
<Select name="Gender">
<option value="" selected>Select Gender</option>
<option value="Male"Male</option>
<option value="Female"Female</option>

</Select>
<input type="text" name="text1" id="text1">
<br>
<br>
<input type="password" size="10" maxlength="15" name="password"
value="MyPassword" id="password">
<HR>
<BR>
<BR>
<I><B>Instructions:</I></BCheck (click) the box of each of the
following
words or phrases that would usually describe you. If you
unintentionally or
mistakenly a check a box, you may click it to uncheck.
<BR>
<BR>
01. <input type="checkbox" id="1_AbleToGiveOrders"
name="1_AbleToGiveOrders" value="1">
<label for="AbleToGiveOrders">Able to give orders</label>
<BR>
02. <input type="checkbox" id="2_Appreciative" name="2_Appreciative"
value="1">
<label for="Appreciative">Appreciative</label>
<BR>
03. <input type="checkbox" id="3_Apologetic" name="3_Apologetic"
value="1">
<label for="Apologetic">Apologetic</label>
<BR>
04. <input type="checkbox" id="4_AbleToTakeCareOfSelf"
name="4_AbleToTakeCareOfSelf" value="1">
<label for="AbleToTakeCareOfSelf">Able to take care of self</label>
<BR>
<BR>
05. <input type="checkbox" id="5_AcceptsAdviceReadily"
Name="5_AcceptsAdviceReadily" value="1">
<label for="AcceptsAdviceReadily">Accepts advice readily</label>
<BR>

......(and so on for all 120 questions)...

<BR>
<Center>
&nbsp; <INPUT TYPE="submit" value="Submit" name="Action" />
</FORM>
<%
On Error Resume Next
If Request.Form("Action") = "Submit" Then
strFilePath = server.MapPath("hgb_experiment.mdb")
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strFilePath
conn.open strConn
n1 = clng(Request.Form("Roster"))

n2 = Request.Form("Instructor")

n3 = Request.Form("Semester")

n4 = Request.Form("Gender")

n5 = clng(Request.Form("Password"))
p1 = cint(Request.Form("1_AbleToGiveOrders"))

p2= cint(Request.Form("2_Appreciative"))

p3= cint(Request.Form("3_Apologetic"))

p4= cint(Request.Form("4_AbleToTakeCareOfSelf"))
p5= cint(Request.Form("5_AcceptsAdviceReadily"))

....(and so on)...
conn.qInsertRecord n1, n2, n3, n4, n5, p1, p2, p3, p4, p5
Response.Write "Your record has been added"

End If

%>
<! ----- FORM CLOSED ---- FORM CLOSED ---- />
</CENTER>
</BODY>
</HTML>

Jul 25 '06 #3

P: n/a
Gaby wrote:
Heres the simplified version of the code. I will only include the
code showing five questions, when the real one has over 120.....
Strip it down even more. We don't need to see any html. Just extract the
code used to communicate with the database and show us that, along with the
details of thetables involved in your queries (field names and datatypes)

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 25 '06 #4

P: n/a
<%
On Error Resume Next
First thing to do Gaby, is to get rid of this line. If there are
errors, this line is hiding them. Run the page without this, and see
if you get an error message. If you do, and don't understand it, post
it here, in full, together with the line that causes the error.

--
Mike Brind

Jul 25 '06 #5

P: n/a

Mike Brind wrote:
<%
On Error Resume Next

First thing to do Gaby, is to get rid of this line. If there are
errors, this line is hiding them. Run the page without this, and see
if you get an error message. If you do, and don't understand it, post
it here, in full, together with the line that causes the error.

--
Mike Brind
Actually, I suspect the cause of the problem will be an error relating
to clng or cint. Here's a section from your code:

<%
....

p1 = cint(Request.Form("1_AbleToGiveOrders"))
p2= cint(Request.Form("2_Appreciative"))
p3= cint(Request.Form("3_Apologetic"))
p4= cint(Request.Form("4_AbleToTakeCareOfSelf"))
....

%>

If any of these are unchecked, they will evaluate to an empty string.
You can't convert that to an int. That will raise an error.
Consequently, when you get to the conn.qInsertRecord line, none of the
parameters are set.

--
Mike Brind

Jul 25 '06 #6

P: n/a

Mike Brind wrote:
<%
On Error Resume Next

First thing to do Gaby, is to get rid of this line. If there are
errors, this line is hiding them. Run the page without this, and see
if you get an error message. If you do, and don't understand it, post
it here, in full, together with the line that causes the error.

--
Mike Brind
I dont get any errors. I just nocite that window when I refresh.

Here is the query I run
It is called: qInsertRecord
Heres a short version. It just looks like:
INSERT INTO Research ( Roster, Instructor, [Password],
1_AbletoGiveOrders, 2_Appreciative )
VALUES ([n1], [n2], [n5], [p1], [p2]);

My table is called Research. and My Acess DB is called
hgb_experiment.mdb

Jul 25 '06 #7

P: n/a
Gaby wrote:
Mike Brind wrote:
>><%
On Error Resume Next

First thing to do Gaby, is to get rid of this line. If there are
errors, this line is hiding them. Run the page without this, and see
if you get an error message. If you do, and don't understand it,
post it here, in full, together with the line that causes the error.

--
Mike Brind

I dont get any errors. I just nocite that window when I refresh.

Here is the query I run
It is called: qInsertRecord
Heres a short version. It just looks like:
INSERT INTO Research ( Roster, Instructor, [Password],
1_AbletoGiveOrders, 2_Appreciative )
VALUES ([n1], [n2], [n5], [p1], [p2]);
What are the datatypes of these fields? What is the significance of the
parameter names?
My table is called Research. and My Acess DB is called
hgb_experiment.mdb
OK, so when you test this query in Access, it works correctly, right? That
means there's a problem running it from ASP. Create a small page to test it,
like this:

<%
dim cn, ar(4)
ar(0)=<hard-coded value appropriate for Roster>
ar(1)=<hard-coded value appropriate for Instructor>
ar(2)=<hard-coded value appropriate for Password>
ar(3)=<hard-coded value appropriate for 1_AbletoGiveOrders>
ar(4)=<hard-coded value appropriate for 2_Appreciative>
set cn=createobject("adodb.connection")
cn.open "provider=microsoft.jet.oledb.4.0;" & _
"data source=" & server.mapppath("hgb_experiment.mdb")
cn.qInsertRecord ar(0),ar(1),ar(2),ar(3),ar(4)
cn.close:set cn=nothing
%>
Run this page. Do you get any errors? Open your database in Access and
verify that the record got inserted. Did it? If so, then we know there's no
problem running the query and the problem is elsewhere, most likely with how
you are handling the data submitted via the form. Anways, try the above test
and let us know the result.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 25 '06 #8

P: n/a
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/interac....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/en...f8082fdbfe.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.
Jul 25 '06 #9

P: n/a
OK, so when you test this query in Access, it works correctly, right? That
means there's a problem running it from ASP. Create a small page to test it,
like this:

<%
dim cn, ar(4)
ar(0)=<hard-coded value appropriate for Roster>
ar(1)=<hard-coded value appropriate for Instructor>
ar(2)=<hard-coded value appropriate for Password>
ar(3)=<hard-coded value appropriate for 1_AbletoGiveOrders>
ar(4)=<hard-coded value appropriate for 2_Appreciative>
set cn=createobject("adodb.connection")
cn.open "provider=microsoft.jet.oledb.4.0;" & _
"data source=" & server.mapppath("hgb_experiment.mdb")
cn.qInsertRecord ar(0),ar(1),ar(2),ar(3),ar(4)
cn.close:set cn=nothing
%>
Run this page. Do you get any errors? Open your database in Access and
verify that the record got inserted. Did it? If so, then we know there's no
problem running the query and the problem is elsewhere, most likely with how
you are handling the data submitted via the form. Anways, try the above test
and let us know the result.
Since you are running the existing query I have do I have to change
that as well to include ar(0), ar(1), ect? also, should i put the hard
coded values in "" or not? Let me know so I can run the test page like
you say.

Thanks again everyone for the help.
Im really trying to get this done ASAP so I can begin experiments next
week.

Gabriel

Jul 26 '06 #10

P: n/a
Gaby wrote:
>OK, so when you test this query in Access, it works correctly,
right? That means there's a problem running it from ASP. Create a
small page to test it, like this:

<%
dim cn, ar(4)
ar(0)=<hard-coded value appropriate for Roster>
ar(1)=<hard-coded value appropriate for Instructor>
ar(2)=<hard-coded value appropriate for Password>
ar(3)=<hard-coded value appropriate for 1_AbletoGiveOrders>
ar(4)=<hard-coded value appropriate for 2_Appreciative>
set cn=createobject("adodb.connection")
cn.open "provider=microsoft.jet.oledb.4.0;" & _
"data source=" & server.mapppath("hgb_experiment.mdb")
cn.qInsertRecord ar(0),ar(1),ar(2),ar(3),ar(4)
cn.close:set cn=nothing
%>
Run this page. Do you get any errors? Open your database in Access
and verify that the record got inserted. Did it? If so, then we know
there's no problem running the query and the problem is elsewhere,
most likely with how you are handling the data submitted via the
form. Anways, try the above test and let us know the result.

Since you are running the existing query I have do I have to change
that as well to include ar(0), ar(1), ect?
?
No. Run it as is. This is intended to test the ability to pass values to
your parameterized query and run it without error.
also, should i put the hard
coded values in "" or not?
Of course! The next step after successfully testing this is to modify it to
accept data submitted from your form.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 26 '06 #11

P: n/a
Bob,

<%
dim cn, ar(4)
ar(0)=<"222334444">
ar(1)=<"Norton">
ar(2)=<"581371">
ar(3)=<"3">
ar(4)=<"3">
set cn=createobject("adodb.connection")
cn.open "provider=microsoft.jet.oledb.4.0;" & _
"data source=" & server.mapppath("hgb_experiment.mdb")
cn.qInsertRecord ar(0),ar(1),ar(2),ar(3),ar(4)
cn.close:set cn=nothing
%>

Tested the page above and I got
Microsoft VBScript compilation error '800a03ea'

Syntax error

/web/test/hbrown/test.asp, line 4

ar(0)=<"222334444">
-------------------^

Jul 26 '06 #12

P: n/a

Gaby wrote:
Mike Brind wrote:
<%
On Error Resume Next
First thing to do Gaby, is to get rid of this line. If there are
errors, this line is hiding them. Run the page without this, and see
if you get an error message. If you do, and don't understand it, post
it here, in full, together with the line that causes the error.

--
Mike Brind

I dont get any errors. I just nocite that window when I refresh.
Did you remove On Error Resume Next?

--
Mike Brind

Jul 26 '06 #13

P: n/a
Did you remove On Error Resume Next?

--
Mike Brind
Yes I did. It made no difference. It went to the FormResponse page
but the info didnt go through.

Jul 26 '06 #14

P: n/a
>ar(0)=<"222334444">
You need to remove < & >.

ar(0)="222334444"

Bob Lehmann

"Gaby" <Ga**************@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
Bob,

<%
dim cn, ar(4)
ar(0)=<"222334444">
ar(1)=<"Norton">
ar(2)=<"581371">
ar(3)=<"3">
ar(4)=<"3">
set cn=createobject("adodb.connection")
cn.open "provider=microsoft.jet.oledb.4.0;" & _
"data source=" & server.mapppath("hgb_experiment.mdb")
cn.qInsertRecord ar(0),ar(1),ar(2),ar(3),ar(4)
cn.close:set cn=nothing
%>

Tested the page above and I got
Microsoft VBScript compilation error '800a03ea'

Syntax error

/web/test/hbrown/test.asp, line 4

ar(0)=<"222334444">
-------------------^

Jul 26 '06 #15

P: n/a
Ok,
I removed the <>

It now looks like...
<%
dim cn, ar(4)
ar(0)="222334444"
ar(1)="Norton"
ar(2)="581371"
ar(3)="3"
ar(4)="3"
set cn=createobject("adodb.connection")
cn.open "provider=microsoft.jet.oledb.4.0;" & _
"data source=" & server.mapppath("hgb_experiment.mdb")
cn.qInsertRecord ar(0),ar(1),ar(2),ar(3),ar(4)
cn.close:set cn=nothing
%>

I ran it and got this error
Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'server.mapppath'

/web/test/hbrown/test.asp, line 10
Let me know you guys think I should do next. Im hopng to get it
running by Monday so Ill be tinkering with it all afternoon.

Thanks again,
Gabriel

Jul 28 '06 #16

P: n/a
Gaby wrote:
Ok,
I removed the <>

It now looks like...
<%
dim cn, ar(4)
ar(0)="222334444"
ar(1)="Norton"
ar(2)="581371"
ar(3)="3"
ar(4)="3"
Nothing to do with the error you are getting of course, but: what are the
datatypes of the fields in this example? If they are Text, then you are
correct to put quotes around the numeric values. If they are Number fields,
you should NOT put quotes around the values when assigning them to the array
elements. You should be passing strings to Text parameters and numbers to
numeric parameters.
set cn=createobject("adodb.connection")
cn.open "provider=microsoft.jet.oledb.4.0;" & _
"data source=" & server.mapppath("hgb_experiment.mdb")
cn.qInsertRecord ar(0),ar(1),ar(2),ar(3),ar(4)
cn.close:set cn=nothing
%>

I ran it and got this error
Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'server.mapppath'
Too many p's in mappath. Could have been a typo on my part
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 28 '06 #17

P: n/a
OK!!! I think we are getting somewhere. It was a typo I overlooked.

<%
dim cn, ar(4)
ar(0)="222334444"
ar(1)="Norton"
ar(2)="581371"
ar(3)="3"
ar(4)="3"
set cn=createobject("adodb.connection")
cn.open "provider=microsoft.jet.oledb.4.0;" & _
"data source=" & server.mappath("hgb_experiment.mdb")
cn.qInsertRecord ar(0),ar(1),ar(2),ar(3),ar(4)
cn.close:set cn=nothing
%>

The information was passed into the table!!

Whats the next step?
Im getting excited. Hopefully, I can get it the form working.

Jul 28 '06 #18

P: n/a
Gaby wrote:
OK!!! I think we are getting somewhere. It was a typo I overlooked.

<%
dim cn, ar(4)
ar(0)="222334444"
ar(1)="Norton"
ar(2)="581371"
ar(3)="3"
ar(4)="3"
Again, are these numbers going into Text fields? If not, then you need to
remove the quotes:

ar(4) = 3
set cn=createobject("adodb.connection")
cn.open "provider=microsoft.jet.oledb.4.0;" & _
"data source=" & server.mappath("hgb_experiment.mdb")
cn.qInsertRecord ar(0),ar(1),ar(2),ar(3),ar(4)
cn.close:set cn=nothing
%>

The information was passed into the table!!

Whats the next step?
Im getting excited. Hopefully, I can get it the form working.
OK, now you understand (I hope) the mechanism for passing the data to the
parameters in your saved query. The idea is to pass them in the same order
in which they appear in your saved query, which you can now confirm has been
accomplished.

Let's move on to incorporating it into your existing form ... but let's do
it in small steps. I assume you have a form where the user enters and
submits the data. So change the action property of the form tag to make it
submit to this test page. Then, in this test page, change the hard-coded
values to references to the form variables coming from the submission.

ar(0) = Request.Form("name of variable")

Run your form, enter some test data, submit it, and verify that it gets
added into your database. I would suggest adding this code to the test page,
right after the line that executes the saved query:

dim sql, cmd, arParms, html
sql="Select Roster, Instructor, [Password]," & _
"1_AbletoGiveOrders, 2_Appreciative " & _
"From Research Where Roster = ?"
arParms=Array(ar(0))
set cmd=createobject("adodb.command")
cmd.commandtype=1 'adCmdText
cmd.commandtext=sql
set cmd.activeconnection=cn
set rs=cmd.execute(,arParms)
if rs.eof then
response.write "No record was inserted"
else
response.write "<table border=""1"" "
response.write "style=""border-collapse:collapse;""><tr>"
response.write "<th>Roster</th>"
response.write "<th>Instructor</th>"
response.write "<th>Password</th>"
response.write "<th>1_AbletoGiveOrders</th>"
response.write "<th>2_Appreciative</th></tr><tr><td>"
html=rs.getstring(2,,"</td><td>","</td></tr><tr><td>")
html=left(html,len(html) - 8)
response.write html
response.write "</table>"
end if
rs.close:set rs=nothing

Once you have that accomplished, the next step will be to add some code to
validate that the user enters data that is correct. Users sometime make
mistakes an do things like entering alpha characters when you are expecting
numbers, or entering nothing at all. And some users will maliciously enter
data designed to either damage your database or break into it. See
http://mvp.unixwiz.net/techtips/sql-injection.html
http://www.sqlsecurity.com/DesktopDefault.aspx?tabid=23

You need to deal with these situations before you even create your
connection object ... but, one step at a time.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 29 '06 #19

P: n/a
I tried what you said and it worked. The only thing I need to add if
making it ok to leave data out. I would get a error if I left
checkboxes unchecked. During the actual survey, it will be ok for
students to leave boxes blank if they do not apply. Is there anyway to
code it so that incomplete data is allowed?

Thanks again,
Gabriel

Jul 31 '06 #20

P: n/a
Gaby wrote:
I tried what you said and it worked. The only thing I need to add if
making it ok to leave data out. I would get a error if I left
checkboxes unchecked. During the actual survey, it will be ok for
students to leave boxes blank if they do not apply. Is there anyway
to code it so that incomplete data is allowed?
You need to check for the existence of the checkbox variables and pass
true if they exist and false if they don't. Generically:

checkboxvalue = false
if len(request.form("checkbox")) 0 then
checkboxvalue=true
else
checkboxvalue = false
end if
This can be done in the data validation step I described in my previous
post.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 31 '06 #21

P: n/a
Bob Barrows [MVP] wrote on 31 jul 2006 in
microsoft.public.inetserver.asp.general:
Generically:

checkboxvalue = false
if len(request.form("checkbox")) 0 then
checkboxvalue=true
else
checkboxvalue = false
end if
Twice "checkboxvalue = false" is a bit overdone, Bob.

In one row, try:

checkboxvalue = len(request.form("checkbox")) 0
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 31 '06 #22

P: n/a
Evertjan. wrote:
Bob Barrows [MVP] wrote on 31 jul 2006 in
microsoft.public.inetserver.asp.general:
> Generically:

checkboxvalue = false
if len(request.form("checkbox")) 0 then
checkboxvalue=true
else
checkboxvalue = false
end if

Twice "checkboxvalue = false" is a bit overdone, Bob.

In one row, try:

checkboxvalue = len(request.form("checkbox")) 0
Oops, my cut-and-paste became a copy-and-paste somehow.
Normally I would do what you suggested, but i wanted to make it clear
for Gaby.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 31 '06 #23

P: n/a
I think I get it .

Thanks guys.

Aug 1 '06 #24

P: n/a
I went ahead and fille din the rest of the 130 quesions. It worked
fine with 5 questions but now I get
Microsoft VBScript runtime error '800a0009'

Subscript out of range: '[number: 5]'

/web/test/hbrown/Insert.asp, line 15

i thought maybe it would have to do with the 'ar()' part. Right now I
have it set to ar(138).

I dont know what else I can do to fix this.

Aug 2 '06 #25

P: n/a
Gaby wrote:
I went ahead and fille din the rest of the 130 quesions. It worked
fine with 5 questions but now I get
Microsoft VBScript runtime error '800a0009'

Subscript out of range: '[number: 5]'

/web/test/hbrown/Insert.asp, line 15

i thought maybe it would have to do with the 'ar()' part. Right now I
have it set to ar(138).

I dont know what else I can do to fix this.
What is line 15?
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Aug 2 '06 #26

P: n/a
Gaby wrote on 02 aug 2006 in microsoft.public.inetserver.asp.general:
I went ahead and fille din the rest of the 130 quesions. It worked
fine with 5 questions but now I get
Microsoft VBScript runtime error '800a0009'

Subscript out of range: '[number: 5]'

/web/test/hbrown/Insert.asp, line 15

i thought maybe it would have to do with the 'ar()' part. Right now I
have it set to ar(138).

I dont know what else I can do to fix this.
What are you talking about?

Please quote what you are replying to.

If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at the
top of the article, then click on the "Reply" at the bottom of the article
headers.

<http://www.safalra.com/special/googlegroupsreply/>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 2 '06 #27

P: n/a

Bob Barrows [MVP] wrote:
What is line 15?
This is all it is.
ar(6)= Request.Form("6_AbleToDoubtOthers")

If you want the whole code its a little long. If you think it will
help I can get it to you. Shoot me an email and ill send you a text
file.

Aug 2 '06 #28

P: n/a
Ok, so I got this thing working but now Im having more questions.
Sorry if this topic is geting old but here i go....

i have it where the suvey questions get submitted into the access
table. the code i used is like the one above only with 135 questions.
but now theres a second survey i need to add. once they complete the
first, i want it to go to the second. since there will be two submit
button , how to i get it to edit the existing record and not add a new
one. the students have to enter their roster number on both surveys as
this is there primary key.

Aug 17 '06 #29

This discussion thread is closed

Replies have been disabled for this discussion.