asp SQL server 2000 读取记录直接生成xml文档
2006-12-23 11:00
519 查看
<% @Language="VBScript" %>
<%
Dim objConn, objCmd, i
Set objConn = Server.createobject("ADODB.CONNECTION")
objConn.Open "Provider=SQLOLEDB.1;Password=sa;Persist Security Info=True;User ID=sa;Initial Catalog=ca800;Data Source=
(local)"
Set objCmd = Server.CreateObject("ADODB.Command")
objCmd.ActiveConnection = objConn
objCmd.Properties("Output Stream") = Response
objCmd.Properties("XML Root") = "root"
'objCmd.properties("Output Encoding")="GB2312"
objCmd.CommandText = "Select top 20 * from ca_news for XML Auto,elements"
Response.ContentType = "text/xml"
objCmd.Execute i,,1024 'adExecuteStream
Set objCmd = Nothing
objConn.Close
Set objConn = Nothing
%>
<%
Dim objConn, objCmd, i
Set objConn = Server.createobject("ADODB.CONNECTION")
objConn.Open "Provider=SQLOLEDB.1;Password=sa;Persist Security Info=True;User ID=sa;Initial Catalog=ca800;Data Source=
(local)"
Set objCmd = Server.CreateObject("ADODB.Command")
objCmd.ActiveConnection = objConn
objCmd.Properties("Output Stream") = Response
objCmd.Properties("XML Root") = "root"
'objCmd.properties("Output Encoding")="GB2312"
objCmd.CommandText = "Select top 20 * from ca_news for XML Auto,elements"
Response.ContentType = "text/xml"
objCmd.Execute i,,1024 'adExecuteStream
Set objCmd = Nothing
objConn.Close
Set objConn = Nothing
%>
相关文章推荐
- 使用Python读取TestTrack记录- Part3 动态生成Linq to xml查询语句筛选条件
- C# 生成和读取Xml文档
- DOMINO中用代理读取文档并生成XML文档
- JSP 读取 SQL Server 2000 中 image 型数据生成图片文件
- 分析SQL server表数据结构生成XML数据字典+XSLT生成可视文档
- 在 ASP.net 的项目中生成 Sandcastle 用的 XML 文档
- [ASP.net]从数据库中读取数据自动生成XML
- 用ASP生成XML数据文档
- 如何用ASP生成XML数据文档(zz)
- asp.net中XML文档的写入和读取,以及转化数据集相关实例
- ASP.NET 动态查找数据 并且生成xml文档 同时使用xslt转换为xhtml
- 在.asp.net中读取xml文档
- Java读取excel文件生成xml文档和JSON文档
- asp 读取 utf-8格式文档并生成utf-8格式文档的乱码问题
- asp.net 读取数据库生成百度sitemap_baidu.xml和谷歌
- 在asp.net中无需服务器安装word,利用xml生成word文档
- 使用ASP.NET生成Word文档并直接下载
- ASP读取数据库内容,生成XML
- asp.net 上传XML,txt 直接读取文件内容
- [ASP.net]从数据库中读取数据自动生成XML