<% strType = Request("Type") If Request.form <> "" Then if strType = "" then strWarningErrMsg = "
Vehicle type can not be blank." end if if strWarningErrMsg = "" then ' Create a recordset object to store specific table information Set conn = Server.CreateObject("ADODB.Recordset") 'Establish what records you want selected for the SQL query string SQL = "Select * From TblVehicleTypes where (VehicleType = '" + strType + "')" 'Set the recordset object equal to the SQL query string conn.Open SQL, objADO, 1, 3 if not conn.eof then strWarningErrMsg = "Vehicle Type " & strType & " already exists. Please input another." else conn.addnew conn("VehicleType") = strType Conn.update Response.Redirect "menu.asp" end if end if end if %> <% if strWarningErrMsg <> "" then %> <% end if %>
ADD VEHICLE TYPE
Error(s):<%= strwarningErrMsg %>


Add the vehicle type below.
Vehicle Type: