% '****************************** '函数:ConnectionMssql(ConnStr) '参数:ConnStr,数据库连接代码 '作者:阿里西西 '日期:2007/7/13 '描述:通用数据库连接过程 '示例:%=ConnectionMssql("Provider = Microsoft.Jet.OLEDB.4.0;Data Source = test.mdb")%> '****************************** Sub ConnectionMssql(ConnStr) On Error Resume Next Set objConn = Server.Createobject("ADODB.Connection") objConn.ConnectionTimeout = 12 objConn.ConnectionString = Trim(ConnStr) objConn.Open If objConn.Errors.Count = 0 Then Else Response.Write "ConnectionMssql","数据连接失败,请检查配置文件!" Response.End End If End Sub %>