日期:2014-02-01 浏览次数:20492 次
<%@ Language=VBScript %> <!-- #include file="ADOVBS.inc" --> <% Dim objConn, objCmd, i Set objConn = Server.createobject("ADODB.CONNECTION") objConn.Open "Provider=SQLOLEDB.1;Password=;Persist Security Info=True;User ID=sa;Initial Catalog=PBA;Data Source=(local)" Set objCmd = Server.CreateObject("ADODB.Command") objCmd.ActiveConnection = objConn objCmd.Properties("Output Stream") = Response objCmd.Properties("XML Root") = "root" objCmd.CommandText = "Select * from UserStatus for XML Auto" Response.ContentType = "text/XML" objCmd.Execute i, , adExecuteStream Set objCmd = Nothing objConn.Close Set objConn = Nothing %> |