<%@ codepage=”65001″ %>
<!– #INCLUDE FILE=”ADOVBS.INC” –>
<%
Response.ContentType = “text/xml”
‘ å¦æä¸å¨ adovbs.inc é,å设置ä¸ä¸ªå¸¸é.
 xml:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” /??
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]