www.gusucode.com > 因特达Access数据库在线管理系统 > 因特达Access数据库在线管理系统\code\access\db_from_Access_left.asp
<html> <head> <style type="text/css"> <!-- body,td,th { font-size: 13px; } a:link { color: #0033CC; text-decoration: none; } a:visited { text-decoration: none; color: #0033CC; } a:hover { text-decoration: underline; color: #FF0000; } a:active { text-decoration: none; color: #FF0000; } .selected { background-color: #D8E3F5; border: 1px solid #316AC5; } div{ padding:2px;} --> </style> <script> function showColumn() { oElement=document.elementFromPoint(event.x,event.y) if(oElement.tagName=="A") { document.all.tb.value=oElement.innerHTML form1.submit() } } function chk_select() { var obj=event.srcElement; if (obj.tagName!='A')return; obj.blur(); var as=document.getElementsByTagName("A") for(var i=0;i<as.length;i++) { if (obj==as[i]) { as[i].parentElement.className="selected" } else { as[i].parentElement.className=''; } } } </script> </head> <body onclick="showColumn();chk_select()"> <% on error resume next session("dbstr")="Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Password=;Data Source="&server.mappath(request("dbName")) dbName=server.mappath(request("dbName")) strsql="driver={microsoft access driver (*.mdb)};DBQ="+dbName set conn=server.createobject("adodb.connection") conn.open strsql if err<>0 then response.Write(err&"不是有效数据库") response.End() else set rsSchema=conn.openSchema(20) rsSchema.movefirst response.Write("选择一个表:<br>") Do Until rsSchema.EOF if rsSchema("TABLE_TYPE")="TABLE" then tbName=rsSchema("TABLE_NAME") response.Write("<div><img src=images/tb.gif align=absmiddle> ") response.write("<a href=#c>"& tbName & "</a></div>") end if rsSchema.movenext Loop set conn=nothing end if %> <form action="main.asp" name="form1" target="rightFrame"> <input type="hidden" name="db" value="<%=request("dbName")%>"> <input type="hidden" name="tb" value="<%=tbName%>"> </form> </body> </html>