asp如何实现将一个表的记录添加到另一个表
当调用想把表A中的数据全部复制到表B中数据库是access.语句插入这段代码中,<%'编辑case"edit"ifrequest("pic")=""thenrespons...
当 调用 想把表A中的数据全部复制到表B中 数据库是access. 语句插入这段代码中 ,
<%
'编辑
case "edit"
if request("pic")="" then
response.Write "<script language=javascript>alert('您没有上传图片!');window.location.href='javascript:history.go(-1);';</script>"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from ww_fac where id="&id,conn,1,3
rs("anclassid")=int(request("anclassid"))
if request("nclassid")<>"" then
rs("nclassid")=int(request("nclassid"))
else
rs("nclassid")=0
end if
rs("amclassid")=int(request("amclassid"))
if request("mclassid")<>"" then
rs("mclassid")=int(request("mclassid"))
else
rs("mclassid")=0
end if
'rs("cpmc")=trim(request("cpmc"))
rs("e_cpmc")=trim(request("e_cpmc"))
rs("cpbh")=trim(request("cpbh"))
'rs("Keywords")=trim(request("Keywords"))
rs("e_Keywords")=trim(request("e_Keywords"))
rs("pic")=trim(request("pic"))
rs("pic_small")=replace(trim(request("pic")),"big","small") '小图片地
'rs("intro")=trim(request("intro"))
rs("e_intro")=trim(request("e_intro"))
if request("show")=1 then
rs("show")=true
else
rs("show")=false
end if
if request("sort")<>"" then
rs("sort")=trim(request("sort"))
else
rs("sort")=0
end if
rs.Update
rs.Close
set rs=nothing
response.write"<script>alert('修改成功!');location.href='fac_managebook.asp';</script>"
response.End
end select
%> 展开
<%
'编辑
case "edit"
if request("pic")="" then
response.Write "<script language=javascript>alert('您没有上传图片!');window.location.href='javascript:history.go(-1);';</script>"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from ww_fac where id="&id,conn,1,3
rs("anclassid")=int(request("anclassid"))
if request("nclassid")<>"" then
rs("nclassid")=int(request("nclassid"))
else
rs("nclassid")=0
end if
rs("amclassid")=int(request("amclassid"))
if request("mclassid")<>"" then
rs("mclassid")=int(request("mclassid"))
else
rs("mclassid")=0
end if
'rs("cpmc")=trim(request("cpmc"))
rs("e_cpmc")=trim(request("e_cpmc"))
rs("cpbh")=trim(request("cpbh"))
'rs("Keywords")=trim(request("Keywords"))
rs("e_Keywords")=trim(request("e_Keywords"))
rs("pic")=trim(request("pic"))
rs("pic_small")=replace(trim(request("pic")),"big","small") '小图片地
'rs("intro")=trim(request("intro"))
rs("e_intro")=trim(request("e_intro"))
if request("show")=1 then
rs("show")=true
else
rs("show")=false
end if
if request("sort")<>"" then
rs("sort")=trim(request("sort"))
else
rs("sort")=0
end if
rs.Update
rs.Close
set rs=nothing
response.write"<script>alert('修改成功!');location.href='fac_managebook.asp';</script>"
response.End
end select
%> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询