%@ Language=VBScript %> <% option explicit %>
<% 'the following hides errors... on error resume next 'this is how error processing can be used to make life simpler Set conn = Server.CreateObject("ADODB.Connection") dim fname fname = server.mappath("students.mdb") connstr = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & fname conn.open connstr,"","" Set rs = Server.CreateObject("ADODB.Recordset") ' Substitute in form parameters into the query string 'following is a big error... sql = "select * from studddents;" rs.Open sql, conn, 1, 1 'following finds the error and lets you know about it... if Err.Description <> "" then response.write("
") 'Close the loop iterating records if Err.Description <> "" then response.write("