一个asp源码的问题,请大家帮帮忙
当我要修改bbs的管理员时出现了下面的语句:
Microsoft JET Database Engine 错误 '80040e14'
INSERT INTO 语句包含下列未知的字段名: 'Column_Setting'。确定键入的名称是正确的, 然后重试。
/ml42/bbs/manager/Admin_Master.asp,行 132
请问怎么样去解决啊,帮帮我咯!
<!-- #include file="../Conn.asp" -->
<!--#include file="inc.asp" -->
<!-- #include file="../Include/tb3.asp" -->
<%
'====================================================================
Function Save_Admin
If Not ChkPost Then
ErrMsg="对不起,请不要从外部提交数据!"
Call Error(1)
End If
Dim UserId,BackName,PassWord,PSQL,State
UserId=Request.QueryString ("id")
BackName=Request.Form ("backname")
State=Request.Form ("state")
PassWord=Request.Form ("password")
If PassWord<>"" Then
PassWord=tb3(PassWord)
PSQL=",master_password='"&PassWord&"'"
End If
If BackName="" Or Len(BackName)>50 Then
ErrMsg="登陆名为空或长度超过50个字符!"
Call Error(1)
End If
If IsNumeric(UserId) And UserId<>"" And UserId<>"0" Then
Sql="update LZ_Master set master_name='"&BackName&"',state="&State&""&PSQL&" where master_id="&UserId
conn.execute(sql)
Else
Sql="select master_id from LZ_Master where [master_name]='"&BackName&"'"
Set rs=conn.execute(sql)
If Not rs.eof And Not rs.bof Then
FoundErr=True
ErrMsg="对不起,后台登陆名重复!"
ElseIf PassWord="" Then
FoundErr=True
ErrMsg="对不起,请填写登陆密码!"
Else
行 132 Sql="insert into LZ_Master ([master_name],[master_password],state,Column_Setting,setting) values ('"&BackName&"','"&PassWord&"',"&State&",',',',')"
conn.execute(sql)
End If
If FoundErr Then Call Error(1)
End If
Response.Redirect "admin_master.asp"
End Function
参考答案:就是字段名不对阿,你看数据库中是否有这个字段,名字对不对