<%
'Dim Connstr,Conn,DB
DB="database/#music.asp"
Response.Buffer=True
session.timeout=900
on error resume next
Set fso = Server.CreateObject("Scripting.FileSystemObject")
if fso.FolderExists(server.MapPath("inc"))=false then
DB="../"&DB
end if
set fso=nothing
 On Error Resume Next
Connstr="provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(DB)
	Set Conn = Server.CreateObject("ADODB.Connection")
	Conn.Open Connstr
	If Err Then
		Err.Clear
		Set Conn = Nothing
		Response.Write "数据库连接出错，请检查连接字串。"
		Response.End
	End If

Sub ConnectionDatabase()
	Set Conn = Server.CreateObject("ADODB.Connection")
	Conn.Open Connstr
	If Err Then
		Err.Clear
		Set Conn = Nothing
		Response.Write "数据库连接出错，请检查连接字串。"
		Response.End
	End If
End Sub
Sub CloseConn()
	On Error Resume Next
	If IsObject(Conn) Then
		Conn.Close
		Set Conn = Nothing
	End If
	Set MyCls=Nothing
End Sub
Function SafeRequest(SunName) 
	Dim SunValue 
	SunValue=replace(Request(SunName)," ","") 
	If not isNumeric(SunValue) then 
	Response.write "非法" & SunName & "参数！" 
	Response.end 
	End if
	SafeRequest=SunValue 
End function
%>