侯体宗的博客
  • 首页
  • Hyperf版
  • beego仿版
  • 人生(杂谈)
  • 技术
  • 关于我
  • 更多分类
    • 文件下载
    • 文字修仙
    • 中国象棋ai
    • 群聊
    • 九宫格抽奖
    • 拼图
    • 消消乐
    • 相册

在线数据库管理工具(db007) v1.5

数据库  /  管理员 发布于 6年前   234

在线数据库管理工具 db007 下载:///codes/6195.html

复制代码 代码如下:
<!--
'********************************
'* 用途:
'^ 以视图界面方式在线处理access、sql数据库
'* 作者:官世杰
'* 创建日期:2006-5-28
'* 2006-06-04 增加数据修改功能
'* 2006-06-10 增加了在空表中插入数据功能
'* 2006-09-8 增加修改字段名和表名功能,修正部分错误
'* 执行sql,如果是 select 就返回结果,否则返回执行结果
'* 本程序可以免费使用,转载请保留此信息
'********************************
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>在线数据库管理工具 db007 1.5</title>
<style type="text/css">
<!--
body,td,th {font-family: "宋体";font-size: 12px;}
form {margin:0px;padding:0px;}
body {margin:5px;SCROLLBAR-ARROW-COLOR:#666666;SCROLLBAR-FACE-COLOR:#DDDDDD;SCROLLBAR-DARKSHADOW-COLOR:#999999;SCROLLBAR-HIGHLIGHT-COLOR:#FFFFFF;SCROLLBAR-3DLIGHT-COLOR:#CCCCCC;SCROLLBAR-SHADOW-COLOR:#FFFFFF;SCROLLBAR-TRACK-COLOR:#EEEEEE;}
input {    border-width: 1px;border-style:solid;border-color: #CCCCCC #999999 #999999 #CCCCCC;height: 16px;}
td {background:#FFF;}
textarea {border-width: 1px;border-style: solid;border-color: #CCCCCC #999999 #999999 #CCCCCC;}
a:link {text-decoration: none;}
a:visited {text-decoration: none;}
a:hover {text-decoration: underline;}
a:active {text-decoration: none;}
.fixSpan {width:150px;white-space:nowrap;word-break:keep-all;overflow:hidden;text-overflow:ellipsis;}
-->
</style>
</head>

<body>
<%
if request("key") = "db" then
    session("dbtype") = request("dbtype")
    session("dbstr") = request("dbstr")
    response.redirect "?"
end if

if request("key") = "createdatabase" then
    call createdatabase()
end if

if session("dbtype") = "" or session("dbstr") = "" then
    %>
    <form action="?key=db" method="post" name="dbt">
          <br>
          连接类型:
          <input name="dbtype" type="radio" value="access" onClick="dbstr.value='Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Password=;Data Source=<%=server.mappath("/")&"\"%>'" checked>
          ACCESS
          <input disabled="disabled" type="radio" name="dbtype" value="sql" onClick="dbstr.value='driver={SQL Server};database=;Server=;uid=;pwd='"> 
          SQL<br><br>
          连接字符:<input name="dbstr" type="text" id="dbstr" size="120" value="Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Password=;Data Source=<%=server.mappath("/")&"\"%>">
          <input type="submit" name="Submit" value="连接" /><br><br>
          注:access请使用绝对路径,本文件路径:<%=server.MapPath("db007.asp")%>
    </form>
    <form name="createdatabase" method="post" action="?key=createdatabase">
      <font color=red>创建数据库:</font>路径
      <input name="dataname" type="text" value="<%=server.MapPath("/")&"\database.mdb"%>" size="100">
      <input type="submit" name="Submit" value="创建">
    </form>
    <%
    response.End()
end if

'==================================================================建库
sub createdatabase()
    dim DBName,dbstr,myCat
    on error resume next
    DBName = request("dataname")
    dbstr = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & DBName 
    Set myCat = Server.CreateObject( "ADOX.Catalog" ) 
    myCat.Create dbstr

    if err <> 0 then
        response.write err.description
        session("dbtype") = ""
        session("dbstr") = ""
        response.write "<input type='button' name='ok' value=' 返 回 ' onClick='javascript:history.go(-1)'>"
        response.end
    end if

    session("dbtype") = "access"
    session("dbstr") = dbstr
    response.redirect "?"
end sub

'==================================================================调用链接函数
conn()

function conn()
    dim conn1,connstr
    on error resume next
    select case session("dbtype")
    case "access"
        '==================================================================连接ACCESS数据库
        connstr = session("dbstr")
        Set Conn1 = Server.CreateObject("ADODB.Connection")
        conn1.Open connstr
    case "sql"
        '==================================================================连接SQL数据库
        set conn1 = Server.CreateObject("ADODB.Connection") 
        conn1.open session("dbstr") 
    end select

    if err <> 0 then
        response.write err.description
        session("dbtype") = ""
        session("dbstr") = ""
        response.write "<input type='button' name='ok' value=' 返 回 ' onClick='javascript:history.go(-1)'>"
        response.end
    end if

    set conn = conn1
end function


Sub echo(str)
    Response.Write(str)
End Sub

Function IIf(var, val1, val2)
    If var = True Then
        IIf = val1
     Else
        IIf = val2
    End If
End Function

'正则表达式函数,用于删除注释
'-------------------------------------
Function RegExpReplace(strng, patrn, replStr)
  Dim regEx,match,matches              ' 建立变量。
  Set regEx = New RegExp               ' 建立正则表达式。
  regEx.Pattern = patrn               ' 设置模式。
  regEx.IgnoreCase = True               ' 设置是否区分大小写。
  regEx.Global = True   ' 设置全局可用性。

  RegExpReplace = regEx.Replace(strng, replStr)         ' 作替换。
End Function

'==================================================================ADOVBS 常量声明

'---- DataTypeEnum Values ----
Const adEmpty = 0
Const adTinyInt = 16
Const adSmallInt = 2
Const adInteger = 3
Const adBigInt = 20
Const adUnsignedTinyInt = 17
Const adUnsignedSmallInt = 18
Const adUnsignedInt = 19
Const adUnsignedBigInt = 21
Const adSingle = 4
Const adDouble = 5
Const adCurrency = 6
Const adDecimal = 14
Const adNumeric = 131
Const adBoolean = 11
Const adError = 10
Const adUserDefined = 132
Const adVariant = 12
Const adIDispatch = 9
Const adIUnknown = 13
Const adGUID = 72
Const adDate = 7
Const adDBDate = 133
Const adDBTime = 134
Const adDBTimeStamp = 135
Const adBSTR = 8
Const adChar = 129
Const adVarChar = 200
Const adLongVarChar = 201
Const adWChar = 130
Const adVarWChar = 202
Const adLongVarWChar = 203
Const adBinary = 128
Const adVarBinary = 204
Const adLongVarBinary = 205

'---- FieldAttributeEnum Values ----
Const adFldMayDefer = &H00000002
Const adFldUpdatable = &H00000004
Const adFldUnknownUpdatable = &H00000008
Const adFldFixed = &H00000010
Const adFldIsNullable = &H00000020
Const adFldMayBeNull = &H00000040
Const adFldLong = &H00000080
Const adFldRowID = &H00000100
Const adFldRowVersion = &H00000200
Const adFldCacheDeferred = &H00001000

'---- SchemaEnum Values ----
'---- SchemaEnum Values ----
Const adSchemaProviderSpecific = -1
Const adSchemaAsserts = 0
Const adSchemaCatalogs = 1
Const adSchemaCharacterSets = 2
Const adSchemaCollations = 3
Const adSchemaColumns = 4
Const adSchemaCheckConstraints = 5
Const adSchemaConstraintColumnUsage = 6
Const adSchemaConstraintTableUsage = 7
Const adSchemaKeyColumnUsage = 8
Const adSchemaReferentialConstraints = 9
Const adSchemaTableConstraints = 10
Const adSchemaColumnsDomainUsage = 11
Const adSchemaIndexes = 12
Const adSchemaColumnPrivileges = 13
Const adSchemaTablePrivileges = 14
Const adSchemaUsagePrivileges = 15
Const adSchemaProcedures = 16
Const adSchemaSchemata = 17
Const adSchemaSQLLanguages = 18
Const adSchemaStatistics = 19
Const adSchemaTables = 20
Const adSchemaTranslations = 21
Const adSchemaProviderTypes = 22
Const adSchemaViews = 23
Const adSchemaViewColumnUsage = 24
Const adSchemaViewTableUsage = 25
Const adSchemaProcedureParameters = 26
Const adSchemaForeignKeys = 27
Const adSchemaPrimaryKeys = 28
Const adSchemaProcedureColumns = 29
Const adSchemaDBInfoKeywords = 30
Const adSchemaDBInfoLiterals = 31
Const adSchemaCubes = 32
Const adSchemaDimensions = 33
Const adSchemaHierarchies = 34
Const adSchemaLevels = 35
Const adSchemaMeasures = 36
Const adSchemaProperties = 37
Const adSchemaMembers = 38
Const adSchemaTrustees = 39
Const adSchemaFunctions = 40
Const adSchemaActions = 41
Const adSchemaCommands = 42
Const adSchemaSets = 43

'==================================================================返回字段类型函数
Function typ(field_type)
    'field_type = 字段类型值
    Select Case field_type
        case adEmpty:typ = "Empty"
        case adTinyInt:typ = "TinyInt"
        case adSmallInt:typ = "SmallInt"
        case adInteger:typ = "Integer"
        case adBigInt:typ = "BigInt"
        case adUnsignedTinyInt:typ = "TinyInt" 'UnsignedTinyInt
        case adUnsignedSmallInt:typ = "UnsignedSmallInt"
        case adUnsignedInt:typ = "UnsignedInt"
        case adUnsignedBigInt:typ = "UnsignedBigInt"
        case adSingle:typ = "Single" 'Single
        case adDouble:typ = "Double" 'Double
        case adCurrency:typ = "Money" 'Currency
        case adDecimal:typ = "Decimal"
        case adNumeric:typ = "Numeric" 'Numeric
        case adBoolean:typ = "Bit" 'Boolean
        case adError:typ = "Error"
        case adUserDefined:typ = "UserDefined"
        case adVariant:typ = "Variant"
        case adIDispatch:typ = "IDispatch"
        case adIUnknown:typ = "IUnknown"
        case adGUID:typ = "GUID" 'GUID
        case adDATE:typ = "DateTime" 'Date
        case adDBDate:typ = "DBDate"
        case adDBTime:typ = "DBTime"
        case adDBTimeStamp:typ = "DateTime" 'DBTimeStamp
        case adBSTR:typ = "BSTR"
        case adChar:typ = "Char"
        case adVarChar:typ = "VarChar"
        case adLongVarChar:typ = "LongVarChar"
        case adWChar:typ = "Text" 'WChar类型 SQL中为Text
        case adVarWChar:typ = "VarChar" 'VarWChar
        case adLongVarWChar:typ = "Text" 'LongVarWChar
        case adBinary:typ = "Binary"
        case adVarBinary:typ = "VarBinary"
        case adLongVarBinary:typ = "LongBinary"'LongVarBinary
        case adChapter:typ = "Chapter"
        case adPropVariant:typ = "PropVariant"
        case else:typ = "Unknown"
    end select
End Function

'==================================================================返回字段类型列表
Function fieldtypelist(n)
    dim strlist,str1,str2
    strlist = "<select name=""field_type"">"
    if session("dbtype") = "access" then
        strlist = strlist & "<option value=""VarChar"">文本</option>"
        strlist = strlist & "<option value=""Text"">备注</option>"
        strlist = strlist & "<option value=""Bit"">(是/否)</option>"
        strlist = strlist & "<option value=""TinyInt"">数字(字节)</option>"
        strlist = strlist & "<option value=""SmallInt"">数字(整型)</option>"
        strlist = strlist & "<option value=""Integer"">数字(长整型)</option>"
        strlist = strlist & "<option value=""Single"">数字(单精度)</option>"
        strlist = strlist & "<option value=""Double"">数字(双精度)</option>"
        strlist = strlist & "<option value=""Numeric"">数字(小数)</option>"
        strlist = strlist & "<option value=""GUID"">数字(同步ID)</option>"
        strlist = strlist & "<option value=""DateTime"">时间/日期</option>"
        strlist = strlist & "<option value=""Money"">货币</option>"
        strlist = strlist & "<option value=""Binary"">二进制</option>"
        strlist = strlist & "<option value=""LongBinary"">长二进制</option>"
        strlist = strlist & "<option value=""LongBinary"">OLE 对象</option>"

    else
        strlist = strlist & "<option value="""">选择类型</option>"
        strlist = strlist & "<option value=""BigInt"">bigint</option>"
        strlist = strlist & "<option value=""Binary"">binary(二进制数据类型)</option>"
        strlist = strlist & "<option value=""Bit"">bit(整型)</option>"
        strlist = strlist & "<option value=""Char"">char(字符型)</option>"
        strlist = strlist & "<option value=""DateTime"">datetime(日期时间型)</option>"
        strlist = strlist & "<option value=""Decimal"">decimal(精确数值型)</option>"
        strlist = strlist & "<option value=""Float"">float(近似数值型)</option>"
        strlist = strlist & "<option value=""Image"">image(二进制数据类型)</option>"
        strlist = strlist & "<option value=""Int"">int(整型)</option>"
        strlist = strlist & "<option value=""Money"">money(货币型)</option>"
        strlist = strlist & "<option value=""nchar"">nchar(统一编码字符型)</option>"
        strlist = strlist & "<option value=""ntext"">ntext(统一编码字符型)</option>"
        strlist = strlist & "<option value=""numeric"">numeric(精确数值型)</option>"
        strlist = strlist & "<option value=""nvarchar"">nvarchar(统一编码字符型)</option>"
        strlist = strlist & "<option value=""real"">real(近似数值型)</option>"
        strlist = strlist & "<option value=""smalldatetime"">Smalldatetime(日期时间型)</option>"
        strlist = strlist & "<option value=""smallint"">smallint(整型)</option>"
        strlist = strlist & "<option value=""smallmoney"">smallmoney(货币型)</option>"
        strlist = strlist & "<option value=""sql_variant"">sql_variant()</option>"
        strlist = strlist & "<option value=""text"">text(字符型)</option>"
        strlist = strlist & "<option value=""timestamp"">timestamp(特殊数据型)</option>"
        strlist = strlist & "<option value=""tinyint"">tinyint(整型)</option>"
        strlist = strlist & "<option value=""uniqueidentifier"">Uniqueidentifier(特殊数据型)</option>"
        strlist = strlist & "<option value=""varbinary"">varbinary(二进制数据类型)</option>"
        strlist = strlist & "<option value=""varchar"">varchar(字符型)</option>"
    end if
    str1 = """" & n & """"
    str2 = """" & n & """" & " selected"
    strlist = replace(strlist,str1,str2)
    strlist = strlist & "</select>"
    echo strlist
End Function

'==================================================================主界面
sub main(str)
    on error resume next
    %>
    <script language=javascript>
    ie = (document.all)? true:false
    if (ie){
    function ctlent(eventobject){if(event.ctrlKey && 
    window.event.keyCode==13){this.document.exesql.submit();}}
    }
    </script>
    <script language="javascript">
        function table_delete()
        {
        if (confirm("确认删除该记录吗?   该操作将不可撤销!!!"))
            return true;
        else
            return false;
        }
    </script>

    <form action="?key=sql" method=post name="exesql">        
        <font color=red>执行sql语句:</font><font color=#999999>(每句语句以“;”结束,支持(--)SQL注释,Ctrl + Enter 快速提交)</font>  <input type="button" value="刷新本页" onClick="javascript:location.reload()">     
        <span onClick="document.exesql.sql.rows+=5;" style="cursor:pointer;">+</span>
        <span onClick="if(document.exesql.sql.rows>9)document.exesql.sql.rows-=5" style="cursor:pointer;">-</span>
        <div style="float:left;width:600px;">
        <textarea id="sql" name="sql" style="width:600px;" rows="9" ondblClick="this.select();" onKeyDown="ctlent()"><%=request("sql")%></textarea><br />
        <input type="checkbox" name="SchemaTable" value="1" style="border:0px;">adSchemaTables 
        <input type="checkbox" name="SchemaColumn" value="2" style="border:0px;">adSchemaColumns
        <input type="checkbox" name="SchemaProvider" value="3" style="border:0px;">adSchemaProviderTypes   
        分页大小:
        <select name="pageSize">
          <%
          if request("pageSize") <> "" and  isNumeric(request("pageSize")) then
             echo "<option value='"&request("pageSize")&"' selected>"&request("pageSize")&"</option>"
          else
             echo "<option value='50'>50</option>"
          end if
          %>
          <option value="10">10</option>
          <option value="20">20</option>
          <option value="30">30</option>
          <option value="40">40</option>
          <option value="50">50</option>
          <option value="60">60</option>
          <option value="70">70</option>
          <option value="80">80</option>
          <option value="90">90</option>
          <option value="100">100</option>
        </select>

        </div>
        <div style="float:left;width:50px;padding:60px 0px 0px 5px;">
        <input type="submit" name="Submit_confirm" value="提交"> <br /> <br />  
        <input type="button" name="Submit3" value="清空" onClick="sql.value=''"><br /><br /> 
        <input type="button" name="ok" value="返回" onClick="javascript:history.go(-1)">
        </div>
    </form>  
    <div style="clear:both"></div>
    <% if str = "" then %>
    <form action="?key=addtable" method="post">        
        <div style="clear:both;text-align:left;"><br />
        <font color=red>创建新表:</font><br>
        表  名:<input type="text" name="table_name" size="20"><br>
        字段数:<input type="text" name="field_num" size="20">
        <input type="submit" name="Submit_create" value="提交">
        <input type="reset" name="Submit32" value="重置">
        </div>     
    </form> 
    <br><br>
    <a href="https://www.ai


  • 上一条:
    shell脚本监控mysql主从状态
    下一条:
    shell脚本将Oracle服务器中数据定时增量刷新到ftp服务器中
  • 昵称:

    邮箱:

    0条评论 (评论内容有缓存机制,请悉知!)
    最新最热
    • 分类目录
    • 人生(杂谈)
    • 技术
    • linux
    • Java
    • php
    • 框架(架构)
    • 前端
    • ThinkPHP
    • 数据库
    • 微信(小程序)
    • Laravel
    • Redis
    • Docker
    • Go
    • swoole
    • Windows
    • Python
    • 苹果(mac/ios)
    • 相关文章
    • 分库分表的目的、优缺点及具体实现方式介绍(0个评论)
    • DevDB - 在 VS 代码中直接访问数据库(0个评论)
    • 在ubuntu系统中实现mysql数据存储目录迁移流程步骤(0个评论)
    • 在mysql中使用存储过程批量新增测试数据流程步骤(0个评论)
    • php+mysql数据库批量根据条件快速更新、连表更新sql实现(0个评论)
    • 近期文章
    • 在go中实现一个常用的先进先出的缓存淘汰算法示例代码(0个评论)
    • 在go+gin中使用"github.com/skip2/go-qrcode"实现url转二维码功能(0个评论)
    • 在go语言中使用api.geonames.org接口实现根据国际邮政编码获取地址信息功能(1个评论)
    • 在go语言中使用github.com/signintech/gopdf实现生成pdf分页文件功能(0个评论)
    • gmail发邮件报错:534 5.7.9 Application-specific password required...解决方案(0个评论)
    • 欧盟关于强迫劳动的规定的官方举报渠道及官方举报网站(0个评论)
    • 在go语言中使用github.com/signintech/gopdf实现生成pdf文件功能(0个评论)
    • Laravel从Accel获得5700万美元A轮融资(0个评论)
    • 在go + gin中gorm实现指定搜索/区间搜索分页列表功能接口实例(0个评论)
    • 在go语言中实现IP/CIDR的ip和netmask互转及IP段形式互转及ip是否存在IP/CIDR(0个评论)
    • 近期评论
    • 122 在

      学历:一种延缓就业设计,生活需求下的权衡之选中评论 工作几年后,报名考研了,到现在还没认真学习备考,迷茫中。作为一名北漂互联网打工人..
    • 123 在

      Clash for Windows作者删库跑路了,github已404中评论 按理说只要你在国内,所有的流量进出都在监控范围内,不管你怎么隐藏也没用,想搞你分..
    • 原梓番博客 在

      在Laravel框架中使用模型Model分表最简单的方法中评论 好久好久都没看友情链接申请了,今天刚看,已经添加。..
    • 博主 在

      佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 @1111老铁这个不行了,可以看看近期评论的其他文章..
    • 1111 在

      佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 网站不能打开,博主百忙中能否发个APP下载链接,佛跳墙或极光..
    • 2017-06
    • 2017-08
    • 2017-09
    • 2017-10
    • 2017-11
    • 2018-01
    • 2018-05
    • 2018-10
    • 2018-11
    • 2020-02
    • 2020-03
    • 2020-04
    • 2020-05
    • 2020-06
    • 2020-07
    • 2020-08
    • 2020-09
    • 2021-02
    • 2021-04
    • 2021-07
    • 2021-08
    • 2021-11
    • 2021-12
    • 2022-02
    • 2022-03
    • 2022-05
    • 2022-06
    • 2022-07
    • 2022-08
    • 2022-09
    • 2022-10
    • 2022-11
    • 2022-12
    • 2023-01
    • 2023-03
    • 2023-04
    • 2023-05
    • 2023-07
    • 2023-08
    • 2023-10
    • 2023-11
    • 2023-12
    • 2024-01
    • 2024-03
    Top

    Copyright·© 2019 侯体宗版权所有· 粤ICP备20027696号 PHP交流群

    侯体宗的博客