·您的位置: 首页 » 资源教程 » 编程开发 » ASP » 一个基于web的QQ程序 2(xml+asp)

一个基于web的QQ程序 2(xml+asp)

类别: ASP教程  评论数:0 总得分:0
用于处理xmlhttp请求的asp程序,看看时不是很简单啊!??
=====
<%on error resume next
Response.ContentType="text/xml"
    if Request.ServerVariables("REQUEST_METHOD")="POST" then
set req=Server.CreateObject("Microsoft.XMLDOM")
        req.async=false
        req.load(Request)
        set conn=server.CreateObject("adodb.connection")
        conn.Open "odbc","uid","password"
        sql="select uid,id,sex from uidinfo order by id desc"
        set rs=server.CreateObject("adodb.recordset")
        rs.Open sql,conn
        Response.Write "<?xml version=""1.0"" ?>"
        Response.Write "<mess>"
        if not rs.EOF then
            do while not rs.EOF
                Response.Write "<id>"&trim(rs("id"))&"</id><uid>"&trim(rs("uid"))&"</uid><sex>"&trim(rs
("sex"))&"</sex>"
                rs.MoveNext
            loop
        else
            Response.Write "<id>k</id><uid></uid><sex></sex>"
        end if
            Response.Write "</mess>"
        if rs.State=1 then rs.Close
        set rs=nothing
        conn.Close
        set conn=nothing
set req=nothing
end if
%>


-= 资 源 教 程 =-
文 章 搜 索
关键词:
类型:
范围:
纯粹空间 softpure.com
Copyright © 2006-2008 暖阳制作 版权所有
QQ: 15242663 (拒绝闲聊)  Email: faisun@sina.com
 纯粹空间 - 韩国酷站|酷站欣赏|教程大全|资源下载|免费博客|美女壁纸|设计素材|技术论坛   Valid XHTML 1.0 Transitional
百度搜索 谷歌搜索 Alexa搜索 | 粤ICP备19116064号-1