Dim oHTTP As New XMLHTTP30
Dim sFormData As String
Dim bPostData() As Byte bPostData = StrConv(sFormData, vbFromUnicode)
oHTTP.open "POST", requestUrl, False
oHTTP.setRequestHeader "Content-Type:", " multipart/form-data; boundary=-----7d323f12e0740"
oHTTP.send bPostData这是VB中的方法,我在JSP中怎么调用才能得到传过来的bPostData???
Dim sFormData As String
Dim bPostData() As Byte bPostData = StrConv(sFormData, vbFromUnicode)
oHTTP.open "POST", requestUrl, False
oHTTP.setRequestHeader "Content-Type:", " multipart/form-data; boundary=-----7d323f12e0740"
oHTTP.send bPostData这是VB中的方法,我在JSP中怎么调用才能得到传过来的bPostData???
不过原理一样
看
http://blog.csdn.net/online/archive/2004/07/07/35994.aspx
2)单个记录提交到远程asp文件Getsingleinfo.asp(数据增加并返回结果)<%@ Language=VBScript %><%'这里需要修改,返回客户的xml响应文档Response.ContentType = "text/xml" set conn=Server.CreateObject("ADODB.connection")conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("web.mdb") dim xmldom ' set xmldom = Server.CreateObject("Microsoft.XMLDOM") set xmldom = Server.CreateObject("MSXML.DOMDocument")'这里得到
xmldom.load Request dim sid,name,price,catagory,pdate sid = xmldom.selectSingleNode("//项目编号").text name = xmldom.selectSingleNode("//项目名称").text price = xmldom.selectSingleNode("//价格").text catagory = xmldom.selectSingleNode("//种类").text pdate =xmldom.selectSingleNode("//发生日期").text dim strsql,retval on error resume next strsql="insert into test(sid,name,price,catagory,pdate) values('"& sid &"','"& name &"','"& price &"','"& catagory &"','"& pdate &"')" 'response.write strsql conn.execute strsql if err.number=0 then retval="数据成功提交" else retval="数据提交失败,请检查你的数据" end if set xmldom = Nothing set conn=nothing
这一断我有些不大明白,sFormData里面也有-----7d323f12e0740这个拼凑的几个参数值
大概是什么意思,请指教
Content-Type,这个字段用于描述消息内所包含的实体的数据类型。一般浏览器检查该标题,然后调用相应的应用程序察看实体。