动网论坛的asp 数据库连接代码
代码如下:
<%@LANGUAGE="VBSCRIPT"%> <% option explicit dim startime,endtime,conn,strCon,db startime=timer() Dim strSQLServerName Dim strSQLDBUserName Dim strSQLDBPassword Dim strSQLDBName '请填写数据库具体参数 '----------------------------------------------------------------------------------------------- strSQLServerName = "127.0.0.1" '服务器名称或地址 strSQLDBUserName = "sa" '数据库帐号 strSQLDBPassword = "123" '数据库密码 strSQLDBName = "bbsbak" '数据库名称 '----------------------------------------------------------------------------------------------- '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 %>
相关推荐
lbyd0 2020-11-17
sushuanglei 2020-11-12
腾讯soso团队 2020-11-06
gaobudong 2020-11-04
yangkang 2020-11-09
85477104 2020-11-17
KANSYOUKYOU 2020-11-16
wushengyong 2020-10-28
lizhengjava 2020-11-13
星月情缘 2020-11-13
huangxiaoyun00 2020-11-13
luyong0 2020-11-08
Apsaravod 2020-11-05
PeterChangyb 2020-11-05
wwwjun 2020-11-02
gyunwh 2020-11-02
EchoYY 2020-10-31
dingyahui 2020-10-30