以文本方式查看主题 - W3CHINA.ORG讨论区 - 语义网·描述逻辑·本体·RDF·OWL (http://bbs.xml.org.cn/index.asp) -- 『 XML源码及示例(仅原创和转载) 』 (http://bbs.xml.org.cn/list.asp?boardid=32) ---- 将由Ado得到的记录集输出到xml文件 (http://bbs.xml.org.cn/dispbbs.asp?boardid=32&rootid=&id=5371) |
-- 作者:小鞋子 -- 发布时间:2/16/2004 10:40:00 AM -- 将由Ado得到的记录集输出到xml文件 <!-- #include file="adovbs.inc" --> <% ' 删除已经存在的文件 Dim objFSO Set objFSO = Server.CreateObject("Scripting.FileSystemObject") If objFSO.FileExists(Server.MapPath("db_xml.xml")) Then objFSO.DeleteFile Server.MapPath("db_xml.xml") End IF Set objFSO = Nothing ' 定义变量,很好的习惯 Set cnnXML = Server.CreateObject("ADODB.Connection") cnnXML.Open "Provider=SQLOLEDB;Data Source=10.2.1.214;" _ Set rstXML = Server.CreateObject("ADODB.Recordset") Response.Write "<p>Saving data as XML...</p>" & vbCrLf ' 保存xml各式的文件. ' 关闭数据库连接,释放对象 Response.Write "<p>XML file written...</p>" & vbCrLf |
-- 作者:小鞋子 -- 发布时间:2/16/2004 11:29:00 AM -- 如果不生成xml文件可以这样. 转载: http://expert.csdn.net/Expert/topic/2711/2711439.xml?temp=8.472842E-02 if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[test]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) CREATE TABLE [dbo].[test] (
<%@ LANGUAGE = VBScript %> Dim adoConn Dim sConn Dim adoCmd Dim adoStreamQuery Set adoCmd.CommandStream = adoStreamQuery Response.write "Pushing XML to client for processing " & "<BR/>" adoCmd.Properties("Output Stream") = Response <SCRIPT language="VBScript" For="window" Event="onload"> For each child in root.childNodes |
W 3 C h i n a ( since 2003 ) 旗 下 站 点 苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》 |
2,593.750ms |