您现在的位置是:网站首页> 编程资料编程资料
如何把Recordset转换成彩色的XML文件_编程10000问_
2023-05-25
239人已围观
简介 如何把Recordset转换成彩色的XML文件_编程10000问_
<%@ codepage="65001" %>
<%
Response.ContentType = "text/xml"
' 如果不在 adovbs.inc 里,则设置一个常量.
Set Con = Server.CreateObject( "ADODB.Connection" )
Con.Open "Provider=sqloledb;UID=sa;DATABASE=Pubs"
' 建立数据库连接,如到SQL.
Set RS = Server.CreateObject( "ADODB.Recordset" )
' 建立并打开Recordset.
RS.ActiveConnection = Con
RS.CursorType = adOpenStatic
RS.Open "select * from titles"
Response.Write "" & vbCRLF
' 发送给Response对象.
RS.Save Response, adPersistXML
%>
[1]
