谁能帮我改一下这代码。修改的。但是它只能修改数据库的第一条数据。无论你改那条它都写到第一条

[复制链接]
查看11 | 回复1 | 2011-3-21 07:36:53 | 显示全部楼层 |阅读模式
if request(\"cation\")=\"add\" then
id=request.QueryString(\"id\")
title=request.Form(\"title\")
cont=request.Form(\"cont\")
time1=request.Form(\"time1\")
publisher=request.Form(\"publisher\")
set rs=server.CreateObject(\"adodb.recordset\")
sql=\"Select * from news where id=\"script language=\'javascript\'alert(\'信息修改成功!\');/script\"
response.Write\"script language=\'javascript\'parent.window.history.go(-1);location=\'main.asp\'/script\"
response.end
end if

%
回复

使用道具 举报

千问 | 2011-3-21 07:36:53 | 显示全部楼层
<pre id=\"best-answer-content\" class=\"reply-text mb10\">\"br\")
if objconn.state=1 then
response.write\"欢迎使用数据库Exercise.mdb!\"
else
response.write\"对不起,无法打开数据库Exercise.mdb\"
end if
先用上面的代码测试一下数据库的连接是否正常,如果不能打开数据库多半是连接状态的问题,如果能打开数据库,问题可能出在数据类型不符合数据库的存储要求。
下面是0x80040E10的错误描述:
(0x80040E10)--sql语句出错(update字段名或要更新的数据类型错误)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行