<% Option Explicit If not Session("isLoggedIn") Then response.redirect("/ecommerce/default.asp?returnUrl=" & Server.URLEncode(Request.ServerVariables("SCRIPT_NAME"))) End If %> <% Dim intCountryID, strCountryDesc Dim strSQL, rsCountry, strAction strCountryDesc = "" If Request.Form("countryDesc") <> "" Then strCountryDesc = CStr(Request.Form("countryDesc")) intCountryID = 0 If Request.Form("countryID") <> "" Then intCountryID = CInt(Request.Form("countryID")) If Request.Form("isSubmitted") = 1 Then If strCountryDesc = "" Then isErr = true strErrMsg = strErrMsg & "
  • you must supply a country name
  • " End If If not isErr Then If intCountryID <> 0 Then strSQL = "EXEC stpCountryUpdate " & intCountryID & ", " & toSQLStr(strCountryDesc) dbconn.Execute(strSQL) Else strSQL = "EXEC stpCountryInsert " & toSQLStr(strCountryDesc) Set rsCountry = dbconn.Execute(strSQL) If not rsCountry.EOF Then intCountryID = CInt(rsCountry("countryID")) If intCountryID = 0 Then isErr = true strErrMsg = "
  • that country name already exists
  • " End If End If If not rsCountry.State = 0 Then rsCountry.Close() Set rsCountry = Nothing End If End If End If If intCountryID <> 0 Then strSQL = "EXEC stpCountrySelect " & intCountryID Set rsCountry = dbconn.Execute(strSQL) If not rsCountry.EOF Then strCountryDesc = CStr(rsCountry("countryDesc")) End If If rsCountry.State <> 0 Then rsCountry.Close() Set rsCountry = Nothing strAction = "Edit" Else strAction = "Create" End if %> Galuku Cocopeat

    <%= strAction %> Country

    <% If isErr Then %> <% End If %> <% If Request("isSubmitted") = "1" And not isErr Then %> <% End If %>
    The following errors occurred:
      <%= strErrMsg %>
    Country Name
    <%= Request.Form("action") %> successful
     
    Return to Country List    |    <%= strAction %> Country

    ^ back to top