求助 无法写入数据库
请教大家为什么无法写入数据库啊!~~<!-- #include file="LHB_Check_Session.asp"-->
<!-- #include file="Config.asp"-->
<!-- #include file="LHB_Copy.asp" -->
<!-- #include file="LHB_head.asp"-->
<!-- #include file="LHB_DHT_01.asp"-->
<!-- #include file="LHB_DHT_02.asp"-->
<br>
<%
L_Reg=Request("LouHB_Reg")
KHXM=Request("LouHB_KHXM")
SFKP=Request("LouHB_SFKP")
SFZHM=Request("LouHB_SFZHM")
ID=Request("LouHB_ID")
TianJ_XiuG=Request("LouHB_TianJ_XiuG")
CM=Request("LouHB_CM")
XH=Request("LouHB_XH")
DZ=Request("LouHB_DZ")
LXDH=Request("LouHB_LXDH")
GCSJ=Request("LouHB_GCSJ")
CCRQ=Request("LouHB_CCRQ")
HGZH=Request("LouHB_HGZH")
DJH=Request("LouHB_DJH")
FDJH=Request("LouHB_FDJH")
BZ=Request("LouHB_BZ")
Select Case L_Reg
Case "添加"
if Len(KHXM) < 1 then L_CuoWu("请输入用户名!")
if Len(SFZHM) < 1 then L_CuoWu("请输入身份证号码!")
Sub L_CuoWu(LouHB_CuoWu)
if LouHB_CuoWu <> "" then Response.Write("<script>alert('" & LouHB_CuoWu & "');history.back();</script>")
Response.End
End Sub
set save=Louconn.execute("insert into LHB_UserInfo(SFKP,CM,XH,KHXM,DZ,LXDH,SFZHM,GCSJ,CCRQ,HGZH,DJH,FDJH,BZ) values('"&SFKP&"','"&CM&"','"&XH&"','"&KHXM&"','"&DZ&"','"&LXDH&"','"&SFZHM&"','"&GCSJ&"','"&CCRQ&"','"&HGZH&"','"&DJH&"','"&FDJH&"',"&BZ&"')")
set save=nothing
Call Copy()
response.write "<script language=JavaScript>" & chr(23) & "alert('恭喜,添加成功!');"&"window.location.href = 'Add_User.asp?LouHB_TianJ_XiuG=1'"&" </script>"
Response.End
Case "修改"
Set Lours=server.createobject("adodb.recordset")
Check="Select * From LHB_UserInfo where id="&ID
Lours.Open Check,LouConn,2,3
Lours("KHXM")=KHXM
Lours("SFKP")=SFKP
Lours("SFZHM")=SFZHM
Lours("CM")=CM
Lours("XH")=XH
Lours("DZ")=DZ
Lours("LXDH")=LXDH
Lours("GCSJ")=GCSJ
Lours("CCRQ")=CCRQ
Lours("HGZH")=HGZH
Lours("DJH")=DJH
Lours("FDJH")=FDJH
Lours("BZ")=BZ
Lours.update
Lours.Close
Set Lours=Nothing
LouConn.Close
Set LouConn=Nothing
Call Copy()
response.write "<script language=JavaScript>" & chr(23) & "alert('恭喜,修改成功!');"&"window.location.href = 'Add_User.asp?LouHB_TianJ_XiuG=1'"&" </script>"
Response.End
End Select
Select Case TianJ_XiuG
Case 2
Set Lours=server.createobject("adodb.recordset")
CX="Select * From LHB_UserInfo where id="&ID
Lours.Open CX,Louconn,1,1
SFKP=Lours("SFKP")
KHXM=Lours("KHXM")
SFZHM=Lours("SFZHM")
CM=Lours("CM")
XH=Lours("XH")
DZ=Lours("DZ")
LXDH=Lours("LXDH")
GCSJ=Lours("GCSJ")
CCRQ=Lours("CCRQ")
HGZH=Lours("HGZH")
DJH=Lours("DJH")
FDJH=Lours("FDJH")
BZ=Lours("BZ")
End Select
%>
<table width="41%" border="0" cellspacing="0" cellpadding="0" align="center" class="table4">
<form name="form1" method="post" action="Add_User.asp?LouHB_TianJ_XiuG=<%=TianJ_XiuG%>&LouHB_ID=<%=ID%>">
<tr align="center">
<td height="30" colspan="2" background="pic/bg.gif">
<%
If TianJ_XiuG=1 Then
response.write"用户添加"
ElseIF TianJ_XiuG=2 Then
response.write"用户修改"
End If
%></td>
</tr>
<tr>
<td width="22%" align="center">是否开票</td>
<td width="78%"><select name="LouHB_SFKP" type="text" size=1 class="button1">
<option value="1" <%If SFKP=1 Then response.write"selected" End If%>>是</option>
<option value="2" <%If SFKP=2 Then response.write"selected" End If%>>否</option>
</select></td>
</tr>
<tr>
<td align="center">车 名</td>
<td><input name="LouHB_CM" type="text" class="button1" size="30" value="<%=CM%>"></td>
</tr>
<tr>
<td align="center">车 型</td>
<td><input name="LouHB_XH" type="text" class="button1" size="30" value="<%=XH%>"></td>
</tr>
<tr>
<td align="center">姓 名</td>
<td><%
response.write"<input name='LouHB_KHXM' type='text' class='button1' size='30' "
response.write"value='"&L_KHXM&"'"
If TianJ_XiuG=2 Then
response.write"readonly"
End If
response.write">"
%></td>
</tr>
<tr>
<td align="center">地 址</td>
<td><input name="LouHB_DZ" class="button1" size="30" type="text" value="<%=DZ%>"></td>
</tr>
<tr>
<td align="center">联系电话</td>
<td><input name="LouHB_LXDH" class="button1" size="30" type="text" value="<%=LXDH%>" ></td>
</tr>
<tr align="center">
<td>身份证号码</td>
<td><div align="left">
<input name="LouHB_SFZHM" type="text" class="button1" size="30" value="<%=SFZHM%>">
</div></td>
</tr>
<tr align="center">
<td>购车时间</td>
<td><div align="left">
<input name="LouHB_GCSJ" class="button1" size="30" type="text" value="<%=GCSJ%>" >
</div></td><td width="46%"><a href="#SelectDate" onClick="javascript:window.open('Select_Date.asp?form=form1&field=LouHB_GCSJ','','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=190,height=170');"><img src="pic/RiLi.gif" width="30" height="30" border="0" alt="选择日期"></a></td>
</tr>
</tr>
<tr align="center">
<td>出厂日期</td>
<td><div align="left">
<input name="LouHB_CCRQ" class="button1" size="30" type="text" value="<%=CCRQ%>" >
</div></td></td><td width="46%"><a href="#SelectDate" onClick="javascript:window.open('Select_Date.asp?form=form1&field=LouHB_CCRQ','','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=190,height=170');"><img src="pic/RiLi.gif" width="30" height="30" border="0" alt="选择日期"></a></td>
</tr>
<tr align="center">
<td>合格证号</td>
<td><div align="left">
<input name="LouHB_HGZH" class="button1" size="30" type="text" value="<%=HGZH%>" >
</div></td>
</tr>
<tr align="center">
<td>大架号</td>
<td><div align="left">
<input name="LouHB_DJH" class="button1" size="30" type="text" value="<%=DJH%>" >
</div></td>
</tr>
<tr align="center">
<td>发动机号</td>
<td><div align="left">
<input name="LouHB_FDJH" class="button1" size="30" type="text" value="<%=FDJH%>" >
</div></td>
</tr>
<tr align="center">
<td>备注</td>
<td><div align="left">
<textarea name="LouHB_BZ" cols="30" rows="1" class="goto" value="<%=BZ%>"></textarea>
</div></td>
</tr>
<tr align="center">
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="2"><%
If TianJ_XiuG=2 Then
response.write"<input name=""LouHB_Reg"" type=""submit"" class=""button1"" value=""修改"">"
Else
response.write"<input name=""LouHB_Reg"" type=""submit"" class=""button1"" value=""添加"">"
End If
%></td>
</tr>
</form>
</table>
<br>
<%
LouConn.Close
Set LouConn=Nothing
Call Copy()
%>