<%@ codepage="65001" %>
<!-- #INCLUDE FILE="ADOVBS.INC" -->
<%
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 "<?xml version='1.0' encoding='ISO-8859-1'?>" & vbCRLF
' 发送给Response对象.
RS.Save Response, adPersistXML
%>
[1]
本文章来源于网络,作者是:,由代码部落进行采编,如涉及侵权请联系删除!转载请注明出处:https://daimabuluo.cc/biancheng10000wen/1053.html