<%
 'wang wei============================整合BBS连接数据库对象Begin=========================================== 

		
		if OpenBBS=1 then 
			 on error resume next
				Dim BBSDB,ConnBBS,ConnStrBBS
				 BBSDB=ljpath&"data/bbsgood_speed.mdb"	'ACCESS数据库所在的目录路径,ljPath为相对于当前文件的目录;
		 ConnStrBBS = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(BBSDB)	
				Set ConnBBS = Server.CreateObject("ADODB.Connection")
				ConnBBS.open ConnStrBBS
				
				
			if Err<>0 then 
				Response.write "论坛连接数据库出错,请检查连接数据库的参数及字符串设置是否正确"
				Response.end
			end if
			
			Sub CloseBBS()
		
			ConnBBS.close
			Set ConnBBS=nothing
			End Sub
		end if
		'//关闭数据连接

'////整合动网论坛Begin////////////////////////////////////////////////////
  	if OpenBBS=2 then 

		If IsSqlDataBase = 1 Then
			'必修改设置二：========================SQL数据库设置=============================================================
			'sql数据库连接参数：数据库名(SqlDatabaseName)、用户密码(SqlPassword)、用户名(SqlUsername)、
			'连接名(SqlLocalName)（本地用local，外地用IP）
			Const DVSqlDatabaseName = "dvbbs"
			Const DVSqlPassword = "dvbbs"
			Const DVSqlUsername = "dvbbs"
			Const DVSqlLocalName = "(local)"
			'================================================================================================================
			ConnStrDv = "Provider = Sqloledb; User ID = " & DVSqlUsername & "; Password = " & DVSqlPassword & "; Initial Catalog = " & DVSqlDatabaseName & "; Data Source = " & DVSqlLocalName & ";"
			
		Else
			ConnStrDv = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(ljpath & DVBBSDb)
		end if
		
			Set ConnDv = Server.CreateObject("ADODB.Connection")
			connDv.open ConnStrDv
						
			Sub CloseBBS()
			connDv.close
			Set connDv=nothing
			End Sub
	end if
  
  '////整合动网论坛End////////////////////////////////////////////////////
  



		'//关闭数据连接
 'wang wei============================整合BBS连接数据库对象End=========================================== 
%>