Linux中国  设为主页
 收藏本站
 
当前位置: > 首页 ->编程语言 ->ASP ->ASP函数库
  相关分类: 
ASP
ViualBasic
UML / Rational Rose
PHP4/PHP5
Perl
JAVA/JSP教程
Delphi
ColdFusion
CGI
C/C++
ASP.NET
XML
  站内搜索: 
热门文章排行
热门文章排行 ADO连接数据库字符串大全(04-23)
Asp教程:Response对象(04-23)
网站安全之ASP程序加密/解密方法大揭(04-23)
ASP函数库(05-31)
基于ASP的站内多值搜索(04-24)
精采文章排行
精采文章排行 从本质上看网页(asp,jsp)的编写(06-01)
学以致用 驳“ASP低能论” (06-01)
用VB构建Internet的应用(06-01)
Asp的安全管理(12)(06-01)
Windows 2000 安全性技术概述--3(06-01)
  ·学以致用 驳“ASP低能论” ·用VB构建Internet的应用·Asp的安全管理(12)·Windows 2000 安全性技术概述--3·Windows 2000 安全性技术概述--2·Windows 2000 安全性技术概述--1·ActiveX技术综述(二) ·ActiveX技术综述(一) ·动态网页技术--CGI:ASP:JSP:PHP(4)

ASP函数库

作者:Webmaster   来源:Linuxdby.com   点击:   日期:2007-05-31 [收藏] [投稿]

  IE是否经常中毒?推荐您


    GlHtml = str
End Function
'**************************************************
'函数ID:0003[打开任意数据表并显示表结构及内容]
'函数名:OpOtherDB
'作 用:打开任意数据表并显示表结构及内容
'参 数:DBtheStr   ---- 要打开表的数据库链接字串
'参 数:Opentdname ---- 要打开表名
'返回值:显示表结构及内容
'**************************************************
Public Function OpOtherDB(ByVal DBtheStr,ByVal Opentdname)
  Response.write "<table border='0' width='100%' cellspacing='0' cellpadding='0'>" & vbCrlf
  Set Opdb_Conn=server.createobject("ADODB.Connection")
  Set Opdb_Rs  =server.createobject("ADODB.Recordset")
  Opdb_Conn.open DBtheStr
  Opdb_sql_str="select * from "&Opentdname
  Opdb_Rs.open Opdb_Sql_Str,Opdb_Conn,1,1
  Nfieldnumber=Opdb_Rs.Fields.count
  If Nfieldnumber >0 then
     Response.write "<tr>" & vbCrlf
     For i=0 to (Nfieldnumber-1)
         Response.write "<td style='border-style: ridge; border-width: 1' bgcolor='#E1E1E1' valign='middle' align='center'>"
         Response.write Trim(Opdb_Rs.Fields(i).Name)
         Response.write "</td>" & vbCrlf
     Next
     temptbi=0
     Do While Not Opdb_Rs.Eof
        Response.write "</tr>" & vbCrlf
        For i=0 to (Nfieldnumber-1)
            If (temptbi<2) Then
                Response.write "<td style='border-style: ridge; border-width: 1' bgcolor='#F6F6F6' valign='middle'>"
                Response.write Trim(Opdb_Rs.Fields(i))
                Response.write "</td>" & vbCrlf
                temptbi=temptbi+1
            Else
                Response.write "<td style='border-style: ridge; border-width: 1' valign='middle'>"
                Response.write Trim(Opdb_Rs.Fields(i))
                Response.write "</td>" & vbCrlf
                If temptbi>=3 Then
                   temptbi=0
                Else
                   temptbi=temptbi+1
                End If
            End If
        Next
        Opdb_Rs.MoveNext
        Response.write "</tr>" & vbCrlf
     Loop
  End If
  Opdb_Rs.Close
  Opdb_Conn.Close
  Set Opdb_Rs = Nothing
  Set Opdb_Conn=Nothing
  Response.write "</table>" & vbCrlf
End function
'**************************************************
'函数ID:0004[读取两种路径]
'函数名:Readsyspath
'作 用:读取路径
'参 数:lx   ----  0:服务器IP加路径 1:服务物理路径
'返回值:路径字串
'**************************************************
Public Function Readsyspath(ByVal lx)
  Dim templj,aryTemp,newpath
  templj=""
  newpath=""
  If lx=0 Then
     templj="http://"&Request("SERVER_NAME")&Request("PATH_INFO")
     aryTemp = Split(templj,"/")
  Else
     templj=Request("PATH_TRANSLATED")
     aryTemp = Split(templj,"\")
  End If
  For i = LBound(aryTemp) To UBound(aryTemp)-1
      If lx=0 Then
         newpath=newpath&aryTemp(i)&"/"
      Else
         newpath=newpath&aryTemp(i)&"\"
      End If

 如果您对本文有任何疑问或者建议,请到讨论区发表您的意见: >> 论坛入口 <<

上一页 1 2 34 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 下一页

上一篇:SubSonic 的字段名未转义问题修正   下一篇:关于分页查询和性能问题
文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论

   相关文章:
·从本质上看网页(asp,jsp)的编写

   文章评论:(1条)
  
 请留名: 匿名评论   点击查看所有评论 论坛讨论
 

 声明:刊登此文章是为了传递更多信息,文章内容仅供参考,转载请注明出处。