動(dòng)網(wǎng)論壇的asp 數(shù)據(jù)庫連接代碼
更新時(shí)間:2009年02月20日 01:53:26 作者:
動(dòng)網(wǎng)論壇的asp程序,在一定程度了,成了asp的頂峰之作。高手
復(fù)制代碼 代碼如下:
<%@LANGUAGE="VBSCRIPT"%>
<%
option explicit
dim startime,endtime,conn,strCon,db
startime=timer()
Dim strSQLServerName
Dim strSQLDBUserName
Dim strSQLDBPassword
Dim strSQLDBName
'請(qǐng)?zhí)顚憯?shù)據(jù)庫具體參數(shù)
'-----------------------------------------------------------------------------------------------
strSQLServerName = "127.0.0.1" '服務(wù)器名稱或地址
strSQLDBUserName = "sa" '數(shù)據(jù)庫帳號(hào)
strSQLDBPassword = "123" '數(shù)據(jù)庫密碼
strSQLDBName = "bbsbak" '數(shù)據(jù)庫名稱
'-----------------------------------------------------------------------------------------------
'SQL Server OLE Driver
Set conn = Server.CreateObject("ADODB.Connection")
strCon = "Provider=SQLOLEDB;Server=" & strSQLServerName & ";User ID=" & strSQLDBUserName & ";Password=" & strSQLDBPassword & ";Database=" & strSQLDBName & ";"
conn.Open strCon
function CloseDatabase
Conn.close
Set conn = Nothing
End Function
%>
相關(guān)文章
ASP上傳漏洞之利用CHR(0)繞過擴(kuò)展名檢測腳本
本文部分腳本具有攻擊性,僅供學(xué)習(xí)研究用,請(qǐng)用在合法合理范圍內(nèi),對(duì)造成的損失本人不承擔(dān)責(zé)任,本人也不提供黑客攻擊技術(shù)指導(dǎo)2012-01-01
asp中實(shí)現(xiàn)隨機(jī)分組程序的代碼
asp中實(shí)現(xiàn)隨機(jī)分組程序的代碼...2007-03-03

