需要帮忙。 - 找不到我的错误 [英] Need Help. - Can't find my error

查看:44
本文介绍了需要帮忙。 - 找不到我的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有这个ASP代码有点长,所以你可以

下载它
http://whatthedeuce.net/Form.asp


我无法找出我的错误。我知道它不在我的Access

中,因为我已经测试了我的查询,它运行正常。但每当我尝试

从页面提交时,信息都不会发生。在一边

注意,如果我点击刷新它告诉我它不能刷新而不发送

的信息。我不知道这是否会有所帮助。请帮帮我

如果你们可以。我需要这个用于一个非常重要的研究项目

我的大学。


再次感谢,

Gabriel

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

推荐答案

Gaby写道:
Gaby wrote:

大家好,

我有这个ASP代码有点长,所以你可以

下载它
http://whatthedeuce.net/Form.asp


我无法找出我的错误。我知道它不在我的Access

中,因为我已经测试了我的查询,它运行正常。但每当我尝试

从页面提交时,信息都不会发生。在一边

注意,如果我点击刷新它告诉我它不能刷新而不发送

的信息。我不知道这是否会有所帮助。请帮帮我

如果你们可以。我需要这个在一个非常重要的研究项目

我的大学。
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.



你最好创建一个我们可以创建一个小的repro页面自己运行

。删除与您所遇到的症状无关的所有内容,并在此处发布。提供数据库表格和

查询的详细信息。

-

Microsoft MVP - ASP / ASP.NET

请回复新闻组。这个电子邮件帐户是我的垃圾邮件陷阱所以我

不经常检查它。如果你必须离线回复,那么删除

NO SPAM

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"


这是代码的简化版本。我将只包含代码

显示五个问题,当真正的一个超过120 .....

-


< HTML>

< HEAD>

< TITLE>调查:特征与IT< / TITLE>

<样式类型=" text / css" body {颜色:黑色;背景:99CCFF; }

body {margin-left:5%;保证金权利:5%}

h1 {保证金左:-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;边宽:薄;宽度:100%}

div.color {background:rgb(204,204,255);填充:0.5em;边界:

无; }

< / Style>

< / HEAD>

< BODY>

< FORM名称= QUOT; frmtrial_IPC"方法= QUOT;交" action =" FormResponse.asp">

< P>以下是调查页面的草稿。< / P>

< br>

< Select name =" Instructor">

< option value =""选择>选择讲师< /选项>

<选项值=" Ammons">

Ammons< / option>

< option value =" Norton">

Norton< / option>

< option value =" OTHER">

其他< ; / option>

< /选择>

& nbsp; & nbsp;

< Select name =" Semester">

< option value =""选择>选择学期< /选项>

<选项价值=" Spring2006">

春季,2006

< / option> ;

< option value =" SummerI2006">

Summer I,2006< / option>

< option value =" ; SummerII2006">

Summer II,2006< / option>

< option value =" Fall2006">

秋天, 2006< / option>

< / Select>

Class Roster#:< input type =" text"大小= QUOT; 12英寸maxlength =" 6"

name =" roster" id =" roster">

< br>

< Select name =" Gender">

< option值= QUOT;"选择>选择性别< /选项>

<选项值="男性"男< /选项>

<选项值="女性"女< /选项>


< /选择>

< input type =" text"命名= QUOT;&的text1 QUOT; id =" text1">

< br>

< br>

< input type =" password"大小= QUOT; 10" MAXLENGTH = QUOT; 15" name =" password"

value =" MyPassword" id =" password">

<<>

< BR>

< BR>

< I>< B>说明:< / I>< / BCheck(点击)每个

后面的框

单词或短语这通常会形容你。如果你无意中给b $ b或者b $ b错误地选中一个方框,你可以点击它取消选中。

< BR>

< BR>

01.< input type ="复选框" id =" 1_AbleToGiveOrders"

name =" 1_AbleToGiveOrders" value =" 1">

< label for =" AbleToGiveOrders">能够发出订单< / label>

< BR>

02.< input type ="复选框" ID = QUOT; 2_Appreciative" name =" 2_Appreciative"

value =" 1">

< label for =" Appreciative"> Appreciative< / label>

< BR>

03.< input type ="复选框" ID = QUOT; 3_Apologetic" name =" 3_Apologetic"

value =" 1">

< label for =" Apologetic"> Apologetic< / label>

< BR>

04.< input type ="复选框" id =" 4_AbleToTakeCareOfSelf"

name =" 4_AbleToTakeCareOfSelf" value =" 1">

< label for =" AbleToTakeCareOfSelf">能够照顾自己< / label>

< BR>

< BR>

05.< input type ="复选框" id =" 5_AcceptsAdviceReadily"

Name =" 5_AcceptsAdviceReadily" value =" 1">

< label for =" AcceptsAdviceReadily">接受建议< / label>

< BR>


......(以及所有120个问题等等)...


< BR>

<中心>

& nbsp; < INPUT TYPE =" submit"值= [提交"名称= QUOT;动作" />

< / FORM>

<%

On Error Resume Next

如果请求。表格(行动)=提交表格然后

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 =请求.Form(讲师)


n3 = Request.Form(学期)


n4 = Request.Form(" ;性别")

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


....(依此类推)......

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

Response.Write您的记录已被添加


结束如果


%>

<! ----- FORM CLOSED ---- FORM CLOSED ---- />

< / CENTER>

< / BODY>

< / HTML>

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>


Gaby写道:
Gaby wrote:

继承人简化代码的版本。我只会包含

代码,显示五个问题,当真正的一个超过120时......
Heres the simplified version of the code. I will only include the
code showing five questions, when the real one has over 120.....



甚至将它删除更多。我们不需要看任何HTML。只需提取用于与数据库通信的

代码,并向我们展示,以及查询中涉及的表的详细信息(字段名称和数据类型)

-

Microsoft MVP - ASP / ASP.NET

请回复新闻组。这个电子邮件帐户是我的垃圾邮件陷阱所以我

不经常检查它。如果您必须离线回复,请删除

无垃圾邮件

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"


这篇关于需要帮忙。 - 找不到我的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆