?? opendb.asp
字號:
<!--#include file="Mdbname.asp"-->
<%
dim TxEdition,TxWebsite,TxNumber
dim SystemFolder
dim Conn
dim Sql,Sqlc,Sql_c
dim MyDbPath
dim DBPath,Connstr
TxEdition="V2007"
TxWebsite="CSYS.COM.CN企業全站管理系統"
TxNumber="CSYSY"
'//=============================================================
'程序所在路徑,如程序在根目錄的taixun文件夾里:MyDbPath="taixun/"
MyDbPath=""
'//=============================================================
'用戶第一次使用請修改數據庫地址并修改相應目錄中數據庫名稱
'數據庫地址請在Inc/Mdbname.asp中修改
'//-------------------------------------------------------------
'主數據
connstr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(MyDbPath & MdbName)
On error Resume Next
Set conn = server.createObject("ADODB.Connection")
conn.open ConnStr
if err Then
err.clear
Set Conn = nothing
response.Write "數據庫連接出錯,請檢查連接字串。"
response.end
end if
'//-------------------------------------------------------------
'IP地址
Set CiP=server.createobject("ADODB.CONNECTION")
costr="Provider = Microsoft.Jet.OLEDB.4.0;Data Source =" & Server.MapPath(MyDbPath & LastMdbName)
CiP.open costr
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -