 <%
'888wang [888网] dj程序
'为1则链接sql数据库,为其它则链接Access数据库
sqlconn=0
	set conn=server.createobject("adodb.connection")
if sqlconn=1 then
	dim uid,pwd,database,connStr
	database="wmaBlankDj400" 	'数据库名
	uid="dj"		'登陆用户
	pwd="dj888"   		'登陆用户密码
	ip="GZHT-8B6A4F9F59\SQL2000"    		'sql服务器ip
	connStr="Provider=SQLOLEDB.1;Persist Security Info=False;User ID="&uid&";Initial Catalog="&database&";pwd="&pwd&";Data Source="&ip&"" 
else
	DBPath = Server.MapPath("/data/888wang_com_dj.asa") 'Access数据库路径
	connStr= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DBPath
	'connStr= "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
end if

conn.open connStr	

	sub closeDB()
		set rs=Nothing
		conn.close()
		set conn=nothing
	end sub
%>
