[求助]又是数据库的问题
<HTML><BODY bgcolor="#ccffcc">
<H2 align =center>学 生 基 本 数 据 录 入</H2>
<HR>
<Form method=POST name=add action="d_ins.asp">
<DIV align=center>
<TABLE border=0>
<TR>
<TD height="41">姓名:</TD>
<TD><input type="text" name="name" size="20"></TD>
</TR>
<TR>
<TD height="35">学号:</TD>
<TD><input type="text" name="number" size="20"></TD>
</TR>
<TR>
<TD height="36">班级:</TD>
<TD><INPUT type="text" name="class" size="20"></TD>
</TR>
<TR>
<TD height="34">性别:</TD>
<TD><SELECT size="1" name="sex">
<OPTION selected value="男">男</OPTION>
<OPTION valuve="女">女</OPTION>
</SELECT></TD>
</TR>
<TR>
<TD height="33">民族:</TD>
<TD><INPUT type="text" name="minzu" size="20"></TD>
</TR>
<TR>
<TD height="39">籍贯:</TD>
<TD><input type="text" name="jiguan" size="20"></TD>
</TR>
<TR>
<TD height="37">联系电话:</TD>
<TD><INPUT type="text" name="phone" size="20"></TD>
</TR>
</TABLE>
<INPUT type=submit value="确定" name=B1>
<INPUT type=reSet value="重填" name=B2>
</DIV>
</Form>
</BODY>
</HTML>
d_ins.asp的代码是下面:
<%
on error resume Next
'取得用户输入的数据
t_name=request.form("name")
t_number=request.form("number")
t_class=request.form("class")
t_sex=request.form("sex")
t_minzu=request.form("minzu")
t_phone=request.form("phone")
t_jiguan=request.form("jiguan")
'创建数据库的连接
Set conn = Server.CreateObject("ADODB.Connection")
strProvider = "Provider=sqloledb;Data Source=(local);Initial Catalog=tx1;User ID=sa; Password=; "
conn.Open strProvider
'添加时使用的字段
fields=array("t_name","t_number","t_class","t_sex","t_mizu","t_phone","t_jiguan")
values=array(t_name,t_number,t_class,t_sex,t_minzu,t_phone,t_jiguan)
sql = "INSERT INTO t_student(" & Join(fields,",")&") VALUES ('"&_
Join(values,"','")&"')"
'添加数据
conn.Execute sql
'判断执行是否成功
If conn.Errors.Count>0 Then
Response.Write "系统发生"&conn.errors.Count&"个错误!"
Else
Response.Write "数据添加成功!"
End If
Set conn=nothing
%>
我调试时提示是系统发生一个错误,我不知道是哪里错了,高手指点下,怎么知道哪里错了,这个程序是照课本抄的