如何把Recordset转换成彩色的XML文件

栏目: 编程语言 · 发布时间: 8年前

内容简介:如何把Recordset转换成彩色的XML文件

<%@ 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]


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Database Design and Implementation

Database Design and Implementation

Edward Sciore / Wiley / 2008-10-24 / 1261.00 元

* Covering the traditional database system concepts from a systems perspective, this book addresses the functionality that database systems provide as well as what algorithms and design decisions will......一起来看看 《Database Design and Implementation》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

SHA 加密
SHA 加密

SHA 加密工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具