![]() |
#2
ZHRXJR2018-09-27 20:32
|
html 从word中复制表格出来到ueditor编辑器(此时ueditor编辑器将它变成了html)
发送 application/x-www-form-urlencoded格式用post方法发送
html的数据大于 备注 类型的64k
百度 无奈只好用Ole
不会 从asp中操作ole
百度 看到csdn的帖子
参考(复制)帖子里的东西写出来没用
asp要做的是接受post发送过来的html并把它存到ole类型的字段中

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
function TextToBinary(text)
dim bindata,stream
set stream=server.CreateObject("adodb.stream")
with stream
.Type=2'返回值text字符串模式
.Mode=3'readwrite模式
.Open'打开流
.Charset="gb2312"'设置编码为gb2312
.Position=0'设置流初始位置为0
.WriteText text'写入字符串内容
.Position=0'重新设置流位置为0,要不流位置处于最后,读不到数据
.Type=1'设置流返回值类型为2进制
bindata= .read'读取前面写入的字符串对应的2进制流数据
.Close'关闭流
end with
TextToBinary=bindata
end function
Set conn = Server.CreateObject("ADODB.Connection")
connstr = "driver={Microsoft Access Driver (*.mdb)};pwd=admin;dbq=" & Server.MapPath("/") &"\\data\\TP000023.mdb"
conn.open connstr
set rec= server.createobject("ADODB.recordset")
strsql="select * from sd_model_photo where photoid = (select max(photoid) from sd_model_photo)"
rec.open strsql,conn,1,3
rec("xhsm").AppendChunk TextToBinary(request.form("xhsm"))
rec("xncs").AppendChunk TextToBinary(request.form("xncs"))
rec.update
rec.close
set rec = nothing
set conn = nothing
%>