没有SQl2000或者Oracle 8i怎么生成XML?_XHTML/WEB_黑客防线网安服务器维护基地--Powered by WWW.RONGSEN.COM.CN

没有SQl2000或者Oracle 8i怎么生成XML?

作者:黑客防线网安XML教程基地 来源:黑客防线网安XML教程基地 浏览次数:0

本篇关键词:怎么生成或者没有
黑客防线网安网讯:   当然你可以自己把Recordset编码为XML,不过挺麻烦的,效率也不高。这里介绍一种新的方法:VB Code:Dim objConn As New ADODB.ConnectionDim objRS As New ADODB.RecordsetDim objStream ...

   当然你可以自己把Recordset编码为XML不过挺麻烦的效率也不高这里介绍一种新的方法:

VB Code:
Dim objConn As New ADODB.Connection
Dim objRS As New ADODB.Recordset
Dim objStream As New ADODB.Stream

objConn.Open "Provider=SQLOLEDB.1;Password=;Persist Security Info=True;User ID=sa;Initial Catalog=pubs;Data Source=(local)"
objRS.Open "select * from ", objConn, adOpenForwardOnly, adLockReadOnly, adCmdText
objRS.Save objStream, adPersistXML
objRS.Close
objConn.Close
Set objRS = Nothing
Set objConn = Nothing
objStream.Position = 0
Debug.Print objStream.ReadText
objStream.Close
Set objStream = Nothing
-------------------
ASP Code:
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
objConn.Open "Provider=SQLOLEDB.1;Password=;Persist Security Info=True;User ID=sa;Initial Catalog=pubs;Data Source=(local)"
objRS.Open "select * from ", objConn, adOpenForwardOnly, adLockReadOnly, adCmdText
objRS.Save Response, adPersistXML
objRS.Close
objConn.Close
Set objRS = Nothing
Set objConn = Nothing

    黑客防线网安服务器维护方案本篇连接:http://www.rongsen.com.cn/show-16205-1.html
网站维护教程更新时间:2012-04-06 01:12:40  【打印此页】  【关闭
我要申请本站N点 | 黑客防线官网 |  
专业服务器维护及网站维护手工安全搭建环境,网站安全加固服务。黑客防线网安服务器维护基地招商进行中!QQ:29769479

footer  footer  footer  footer