<% Const CONNECT_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" Function GetConnection Dim dbConn, filePath Set dbConn = Server.CreateObject("ADODB.Connection") filePath = Server.MapPath("../database/bandDB.mdb") dbConn.Open CONNECT_STRING & filePath Set GetConnection = dbConn End Function Sub ShowADOErrors(conn) Dim errLoop, ErrCol 'Here Cnn is the ADO connection object. Set ErrCol = conn.Errors 'You can also check the other properties for Number, Source, SQLState and 'NativeError. If ErrCol.Count > 0 Then For Each errLoop In ErrCol If errLoop.Number <> 0 Then Response.write errLoop.Description & "
" End If Next End If End Sub Sub CheckSession() If Session("Username") = "" Then Response.Redirect("redirect.htm") Else Session.Timeout = 30 End If End Sub Function SqlEncode(sqlValue) SqlEncode = replace(sqlValue, "'", "''") End Function %>