Can a code-behind page contain a connection somehow to determine the MODE for a page to determine whether to ADD, MODIFY or DELETE a record so that the CASE statement could work when proessing database records, or would processing records be handled individually without checking for the MODE of the form? Just trying to make sense out of the way that the typical CASE structure for the database record processing engine could be implemented.<BR><BR>Any insights would be appreciated<!--#include virtual="/cpresourcing/includes/functions.asp"--><BR><%<BR> REGION_ID = REQUEST("REGION_ID")<BR> COUNTRY_ID = REQUEST("COUNTRY_ID")<BR> MODE = REQUEST("MODE")<BR><BR> SQLINSERT = "INSERT INTO LOCATION ("<BR> SQLINSERT = SQLINSERT & "REGION_ID, "<BR> SQLINSERT = SQLINSERT & "COUNTRY_ID"<BR> SQLINSERT = SQLINSERT & ") VALUES ("<BR> SQLINSERT = SQLINSERT & NTODB(REGION_ID) & ", "<BR> SQLINSERT = SQLINSERT & NTODB(COUNTRY_ID) & ")"<BR><BR> SQLEDIT = "UPDATE LOCATION SET "<BR> SQLEDIT = SQLEDIT & "REGION_ID=" & NTODB(REGION_ID) & ", "<BR> SQLEDIT = SQLEDIT & "COUNTRY_ID=" & NTODB(COUNTRY_CODE_ID) & " "<BR> SQLEDIT = SQLEDIT & "WHERE LOCATION_ID=" & REQUEST("LOCATION_ID") & ""<BR><BR> SQLDELETE = "DELETE FROM LOCATION WHERE LOCATION_ID=" & REQUEST("LOCATION_ID")<BR><BR>OpenDatabase()<BR> Select Case MODE<BR> Case "ADD"<BR> DB.ExecuteNoQuery(SQLINSERT)<BR> Case "EDIT"<BR> DB.ExecuteNoQuery(SQLEDIT)<BR> Case "DELETE"<BR> DB.ExecuteNoQuery(SQLDELETE)<BR> End Select<BR>CloseDatabase()<BR>Response.Redirect("/cpresourcing/admin/location/")<BR><BR>%>