查看: 1434|回复: 2
|
[求助] code 有 bugs....
[复制链接]
|
|
Dim conn, rs, str
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("pcplaza.mdb")
if request.Form("delete")<>"" then
Dim element, cmdstr, cmd
Set cmd = Server.CreateObject("ADODB.Command")
cmd.ActiveConnection = conn
for each element in request.Form
cmdstr="delete from pp_privatemsgs" &_
" where msg_id=" & request.Form(element)
cmd.CommandText = cmdstr
cmd.Execute
Next
response.Redirect("privatemsg.asp")
end if
有错吗? 可以 delete database 可是有error:
Error Type:
Microsoft JET Database Engine (0x80040E10)
No value given for one or more required parameters.
/tienyai/privatemsg.asp, line 26(line 26 就是 cmd.execute) |
|
|
|
|
|
|
|
发表于 23-10-2005 10:15 PM
|
显示全部楼层
原帖由 跳到脚酸 于 23-10-2005 09:03 PM 发表
Dim conn, rs, str
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("pcplaza.mdb")
...
Set cmd = Server.CreateObject("ADODB.Command")
这我没有用过..
我觉得你用conn = Server.CreateObject("ADODB.Connection")
即可了..
conn.execute("sql") |
|
|
|
|
|
|
|
发表于 24-10-2005 02:23 PM
|
显示全部楼层
原帖由 跳到脚酸 于 23-10-2005 09:03 PM 发表
Dim conn, rs, str
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("pcplaza.mdb")
...
这个错误有3 scenario :
i.not enough parameter
ii. missspelt column name
iii. incorrect delimeter
please notice your table name is correct or not? |
|
|
|
|
|
|
| |
本周最热论坛帖子
|