ASP 数据存储问题
专家请指教. 以下是将修改的数据,重新提交到数据库下一个表下的程序.问题:我想将修改前数据存到表O_FlowDoc下的A字段 B字段.这代码应该怎么写?
<!--#INCLUDE FILE="../HXINCLUDE/HXINCLUDEHEAD.ASP"--><!--#include file="../HXINCLUDE/upload_5xsoft.inc"-->
<%
WS_FDID=request("ID")
if WS_FDID="" or isnull(WS_FDID) then
HX_GoBack "非法操作",""
end if
ColumnName="":Tablename="HX_FlowDoc":Orderby=" where WS_FDID="&WS_FDID
action=request("action")
set rs=WS_S.HX_SetRSD("",Tablename,Orderby)
Tablename="WS_FlowDoc":Orderby=" where WS_FDID="&WS_FDID
if action="saveinfo" then
set upload=new upload_5xSoft
Subject=upload.form("Subject"):WS_FlowDoczi=upload.form("WS_FlowDoczi"):WS_FlowDochao=upload.form("WS_FlowDochao"):WS_FlowDocGrade=upload.form("WS_FlowDocGrade"):WS_FlowDocmj=upload.form("WS_FlowDocmj"):WS_FlowDocdepartment=upload.form("WS_FlowDocdepartment"):WS_FlowDocTopic=upload.form("WS_FlowDocTopic"):WS_FlowDocCensor=upload.form("Censor"):WS_FlowDocIntroduce=upload.form("Introduce"):WS_FlowDocMemo=upload.form("Memo"):WS_FlowDocContent=upload.form("Content"):send=upload.form("send"):call WS_S.ChkIsOuter()
filepath=WorkFlowFilePath
for each formName in upload.objFile ''列出所有上传了的文件X
set file=upload.file(formName) ''生成一个文件对象
if file.FileSize>0 then ''如果 FileSize > 0 说明有文件数据
FileName=file.FileName
fileExt=lcase(file.FileExt) '得到的文件扩展名不含有.
uploadsuc=false
for i=0 to ubound(Forumupload)
if fileEXT=trim(Forumupload(i)) then
uploadsuc=false
exit for
else
uploadsuc=true
end if
next
if uploadsuc=false then HX_GoBack "文件格式不正确,重新上传",""
ranNum=int(90000*rnd)+10000
FileNextName=year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum&"."&fileExt
FileSeverPath=Server.mappath(filepath&FileNextName)
file.SaveAs FileSeverPath
if WS_S.HX_ScanFile(FileSeverPath) then
WS_S.CheckFile FileSeverPath,True
HX_GoBack "不能上传!",""
end if
wsoasfile=wsoasfile&filepath&FileNextName&"|"
wsoasnextfile=wsoasnextfile&FileName&"|"
end if
FileName=wsoasfile
FileNextName=wsoasnextfile
next
rs("WS_FlowDocSubject")=Subject:rs("WS_FlowDoczi")=WS_FlowDoczi:rs("WS_FlowDochao")=WS_FlowDochao:rs("WS_FlowDocGrade")=WS_FlowDocGrade:rs("WS_FlowDocmj")=WS_FlowDocmj:rs("WS_FlowDocdepartment")=WS_FlowDocdepartment:rs("WS_FlowDocUserName")=LOGINUSERNAME:rs("WS_FlowDocTopic")=WS_FlowDocTopic:rs("WS_FlowDocIntroduce")=WS_FlowDocIntroduce:rs("WS_FlowDocMemo")=WS_FlowDocMemo:rs("WS_FlowDocContent")=WS_FlowDocContent:rs("WS_FlowDocForm")=send:rs("WS_FlowDocBack")=0:rs("WS_FlowDocBackUserName")="":rs("WS_FlowDocBackContent")=""
if file.FileSize>0 then rs("WS_FlowDocAnnex")=FileName:rs("WS_FlowDocAnnexName")=FileNextName
rs.update
'set rs1=server.createobject("ADODB.recordset")
'sql1="select * from O_FlowDoc"
'rs1.Open sql1,conn,1,3
'rs.addnew
'if not rs1.EOF then
'Topic2=rs1("WS_FlowDocTopic")
msg="发文成功!"
set file=nothing
call WS_S.HX_RSClose(rs)
set upload=nothing
HX_GoBack msg,"FlowDocDraft.asp"
end if
%><head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><title>修改工作流</title>
</head>
<body>
<table cellpadding='2' cellspacing='1' border='0' class='border' align=center><tr><td class='Navigation'>修改工作流</font></td>
</tr></table>
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<form name="frmAddMessage" method="post" action="?action=saveinfo&id=<%=rs("WS_FDID")%>" onSubmit="return CheckForm();" onReset="return ResetForm();" enctype='multipart/form-data' target='_self'> <tr bgcolor="#FFFFFF" >
<td width="14%" HEIGHT="16" > 处理方式: </td>
<td width="86%" ><input type="radio" name="send" value="0" checked class=radio id="send01">
<font color="#0000FF"><label for="send01" style="cursor:hand">马上发送</label></font>
<input type="radio" name="send" value="1" class=radio id="send02">
<font color="#0000FF"><label for="send02" style="cursor:hand">暂时保存</label></font></td>
</tr>
<tr bgcolor="#FFFFFF" >
<td> 标 题: </td>
<td> </td>
</tr>
<tr bgcolor="#FFFFFF" >
<td> 是否预算:</td>
<td>
<input name="WS_FlowDoczi" type="text" autocomplete=off value="<%=rs("WS_FlowDoczi")%>" size="5" >
其他:
<input name="WS_FlowDochao" type="text" autocomplete=off value="<%=rs("WS_FlowDochao")%>" size="8" ></td>
</tr>
<tr bgcolor="#FFFFFF" >
<td> 报销类别: </td>
<td><select name="WS_FlowDocGrade">
<option value="普通"<%if rs("WS_FlowDocGrade")="普通" then response.write " selected"%>>普通
<option value="紧急"<%if rs("WS_FlowDocGrade")="紧急" then response.write " selected"%>>急
<option value="加急"<%if rs("WS_FlowDocGrade")="加急" then response.write " selected"%>>加急
</select>
<select name="WS_FlowDocmj">
<option value="电话费"<%if rs("WS_FlowDocmj")="普通" then response.write " selected"%>>电话费
<option value="餐费" selected<%if rs("WS_FlowDocmj")="秘密" then response.write " selected"%>>餐费
<option value="差旅费"<%if rs("WS_FlowDocmj")="机密" then response.write " selected"%>>差旅费
</select></td>
</tr>
<tr bgcolor="#FFFFFF" >
<td> 申请金额:</td>
<td><input name="WS_FlowDocTopic" type="text" autocomplete=off value="<%=rs("WS_FlowDocTopic")%>" size="30" >
<input name="Topic2" type="text" id="Topic2" autocomplete=off value="<%=rs("WS_FlowDocTopic")%>" size="30" ></td>
</tr>
<tr bgcolor="#FFFFFF" >
<td> 发 文 人: </td>
<td><input type="text" autocomplete=off name="WS_FlowDocUserName" size="10" value="<%=rs("WS_FlowDocUserName")%>" readonly></td>
</tr>
<tr bgcolor="#FFFFFF" >
<td> 发文部门:</td>
<td><input type="text" autocomplete=off name="WS_FlowDocdepartment" value="<%=rs("WS_FlowDocdepartment")%>" readonly></td>
</tr>
<tr bgcolor="#FFFFFF" >
<td> 其他说明: </td>
<td><textarea name="Introduce" cols="40" rows="2"><%=rs("WS_FlowDocIntroduce")%></textarea></td>
</tr>
<tr bgcolor="#FFFFFF" >
<td> 附注: </td>
<td><textarea name="Memo" cols="40" rows="2"><%=rs("WS_FlowDocMemo")%></textarea></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><div align="right"> 正文内容: </td>
<td><!--#include file="../HXEditor/WSOAEDITOR.ASP"--></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><div align="right"></td><input name="Content" type="hidden" id="Content" value="<%=Server.HTMLEncode(rs("WS_FlowDocContent"))%>">
<td><input type="submit" class="button" name="submit" value=" 保 存 "> <input type="reset" class="button" name="Reset" value=" 重 写 "> </td>
</tr></form>
</table>
</td>
</tr></table>
<!--#INCLUDE FILE="../HXINCLUDE/HXINCLUDEHEAD.ASP"--><!--#include file="../HXINCLUDE/upload_5xsoft.inc"-->
<%
WS_FDID=request("ID")
if WS_FDID="" or isnull(WS_FDID) then
HX_GoBack "非法操作",""
end if
ColumnName="":Tablename="HX_FlowDoc":Orderby=" where WS_FDID="&WS_FDID
action=request("action")
set rs=WS_S.HX_SetRSD("",Tablename,Orderby)
Tablename="WS_FlowDoc":Orderby=" where WS_FDID="&WS_FDID
if action="saveinfo" then
set upload=new upload_5xSoft
Subject=upload.form("Subject"):WS_FlowDoczi=upload.form("WS_FlowDoczi"):WS_FlowDochao=upload.form("WS_FlowDochao"):WS_FlowDocGrade=upload.form("WS_FlowDocGrade"):WS_FlowDocmj=upload.form("WS_FlowDocmj"):WS_FlowDocdepartment=upload.form("WS_FlowDocdepartment"):WS_FlowDocTopic=upload.form("WS_FlowDocTopic"):WS_FlowDocCensor=upload.form("Censor"):WS_FlowDocIntroduce=upload.form("Introduce"):WS_FlowDocMemo=upload.form("Memo"):WS_FlowDocContent=upload.form("Content"):send=upload.form("send"):call WS_S.ChkIsOuter()
filepath=WorkFlowFilePath
for each formName in upload.objFile ''列出所有上传了的文件X
set file=upload.file(formName) ''生成一个文件对象
if file.FileSize>0 then ''如果 FileSize > 0 说明有文件数据
FileName=file.FileName
fileExt=lcase(file.FileExt) '得到的文件扩展名不含有.
uploadsuc=false
for i=0 to ubound(Forumupload)
if fileEXT=trim(Forumupload(i)) then
uploadsuc=false
exit for
else
uploadsuc=true
end if
next
if uploadsuc=false then HX_GoBack "文件格式不正确,重新上传",""
ranNum=int(90000*rnd)+10000
FileNextName=year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum&"."&fileExt
FileSeverPath=Server.mappath(filepath&FileNextName)
file.SaveAs FileSeverPath
if WS_S.HX_ScanFile(FileSeverPath) then
WS_S.CheckFile FileSeverPath,True
HX_GoBack "不能上传!",""
end if
wsoasfile=wsoasfile&filepath&FileNextName&"|"
wsoasnextfile=wsoasnextfile&FileName&"|"
end if
FileName=wsoasfile
FileNextName=wsoasnextfile
next
rs("WS_FlowDocSubject")=Subject:rs("WS_FlowDoczi")=WS_FlowDoczi:rs("WS_FlowDochao")=WS_FlowDochao:rs("WS_FlowDocGrade")=WS_FlowDocGrade:rs("WS_FlowDocmj")=WS_FlowDocmj:rs("WS_FlowDocdepartment")=WS_FlowDocdepartment:rs("WS_FlowDocUserName")=LOGINUSERNAME:rs("WS_FlowDocTopic")=WS_FlowDocTopic:rs("WS_FlowDocIntroduce")=WS_FlowDocIntroduce:rs("WS_FlowDocMemo")=WS_FlowDocMemo:rs("WS_FlowDocContent")=WS_FlowDocContent:rs("WS_FlowDocForm")=send:rs("WS_FlowDocBack")=0:rs("WS_FlowDocBackUserName")="":rs("WS_FlowDocBackContent")=""
if file.FileSize>0 then rs("WS_FlowDocAnnex")=FileName:rs("WS_FlowDocAnnexName")=FileNextName
rs.update
'set rs1=server.createobject("ADODB.recordset")
'sql1="select * from O_FlowDoc"
'rs1.Open sql1,conn,1,3
'rs.addnew
'if not rs1.EOF then
'Topic2=rs1("WS_FlowDocTopic")
msg="发文成功!"
set file=nothing
call WS_S.HX_RSClose(rs)
set upload=nothing
HX_GoBack msg,"FlowDocDraft.asp"
end if
%><head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><title>修改工作流</title>
</head>
<body>
<table cellpadding='2' cellspacing='1' border='0' class='border' align=center><tr><td class='Navigation'>修改工作流</font></td>
</tr></table>
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<form name="frmAddMessage" method="post" action="?action=saveinfo&id=<%=rs("WS_FDID")%>" onSubmit="return CheckForm();" onReset="return ResetForm();" enctype='multipart/form-data' target='_self'> <tr bgcolor="#FFFFFF" >
<td width="14%" HEIGHT="16" > 处理方式: </td>
<td width="86%" ><input type="radio" name="send" value="0" checked class=radio id="send01">
<font color="#0000FF"><label for="send01" style="cursor:hand">马上发送</label></font>
<input type="radio" name="send" value="1" class=radio id="send02">
<font color="#0000FF"><label for="send02" style="cursor:hand">暂时保存</label></font></td>
</tr>
<tr bgcolor="#FFFFFF" >
<td> 标 题: </td>
<td> </td>
</tr>
<tr bgcolor="#FFFFFF" >
<td> 是否预算:</td>
<td>
<input name="WS_FlowDoczi" type="text" autocomplete=off value="<%=rs("WS_FlowDoczi")%>" size="5" >
其他:
<input name="WS_FlowDochao" type="text" autocomplete=off value="<%=rs("WS_FlowDochao")%>" size="8" ></td>
</tr>
<tr bgcolor="#FFFFFF" >
<td> 报销类别: </td>
<td><select name="WS_FlowDocGrade">
<option value="普通"<%if rs("WS_FlowDocGrade")="普通" then response.write " selected"%>>普通
<option value="紧急"<%if rs("WS_FlowDocGrade")="紧急" then response.write " selected"%>>急
<option value="加急"<%if rs("WS_FlowDocGrade")="加急" then response.write " selected"%>>加急
</select>
<select name="WS_FlowDocmj">
<option value="电话费"<%if rs("WS_FlowDocmj")="普通" then response.write " selected"%>>电话费
<option value="餐费" selected<%if rs("WS_FlowDocmj")="秘密" then response.write " selected"%>>餐费
<option value="差旅费"<%if rs("WS_FlowDocmj")="机密" then response.write " selected"%>>差旅费
</select></td>
</tr>
<tr bgcolor="#FFFFFF" >
<td> 申请金额:</td>
<td><input name="WS_FlowDocTopic" type="text" autocomplete=off value="<%=rs("WS_FlowDocTopic")%>" size="30" >
<input name="Topic2" type="text" id="Topic2" autocomplete=off value="<%=rs("WS_FlowDocTopic")%>" size="30" ></td>
</tr>
<tr bgcolor="#FFFFFF" >
<td> 发 文 人: </td>
<td><input type="text" autocomplete=off name="WS_FlowDocUserName" size="10" value="<%=rs("WS_FlowDocUserName")%>" readonly></td>
</tr>
<tr bgcolor="#FFFFFF" >
<td> 发文部门:</td>
<td><input type="text" autocomplete=off name="WS_FlowDocdepartment" value="<%=rs("WS_FlowDocdepartment")%>" readonly></td>
</tr>
<tr bgcolor="#FFFFFF" >
<td> 其他说明: </td>
<td><textarea name="Introduce" cols="40" rows="2"><%=rs("WS_FlowDocIntroduce")%></textarea></td>
</tr>
<tr bgcolor="#FFFFFF" >
<td> 附注: </td>
<td><textarea name="Memo" cols="40" rows="2"><%=rs("WS_FlowDocMemo")%></textarea></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><div align="right"> 正文内容: </td>
<td><!--#include file="../HXEditor/WSOAEDITOR.ASP"--></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><div align="right"></td><input name="Content" type="hidden" id="Content" value="<%=Server.HTMLEncode(rs("WS_FlowDocContent"))%>">
<td><input type="submit" class="button" name="submit" value=" 保 存 "> <input type="reset" class="button" name="Reset" value=" 重 写 "> </td>
</tr></form>
</table>
</td>
</tr></table>
...全文
相关推荐
基于asp.net的数据存储与交换系统源码.zip
基于asp.net的数据存储与交换系统源码.zip
解决网页乱码问题的方法:ASP+MySQL+UTF
通过以上步骤,可以解决ASP、MySQL和UTF-8编码组合下网页乱码的问题。确保数据库表和字段使用UTF-8字符集,设置ASP页面和网页的字符编码为UTF-8,以及正确处理数据存储和读取时的编码,可以确保网页以正确的编码显示中文内容。在将数据存储到数据库中或从数据库中读取数据时,确保使用正确的编码进行处理。请确保将上述代码中的数据库服务器地址、数据库名称、用户名和密码替换为实际的数据库连接信息。这将把从数据库中读取的数据转换为正确的编码以供网页显示。这将设置网页的字符编码为UTF-8。
基于ASP.NET的数据存储与交换项目设计与实现(源代码+项目报告).zip
基于ASP.NET的数据存储与交换项目设计与实现(源代码+项目报告).zip
asp.net数据存储与交换系统设计(源代码+论文).zip
asp.net数据存储与交换系统设计(源代码+论文).zip
基于ASP.NET的数据存储与交换系统设计与实现(源代码+项目报告).zip
基于ASP.NET的数据存储与交换系统设计与实现(源代码+项目报告).zip


