Hi, I have taken over the maintenance of a website and recently we did a redesign. I am not a programmer and this is where I am running into a problem.

On the website, the original designer created a page that contains an asp form. It allows the HR person at the company to open the form page and add new positions to the website. She opens a page called "jobs_edit.asp" and just fills in the box and hits submit and then the new position appears on the "Current Openings" web page (which is actually "jobopenings.asp" file).

All the files are on the root folder, except the files that are connected to this form page. These are all in a folder called "/oaknoll". I tried to do a test run to see if I could enter a description for one of the positions. but I get an error message after I hit the submit button. I am afraid to mess with the code as I don't want to screw the whole thing up.

Here are the folders and files in the "Oaknoll" folder:

Folder: Admin - file "jobsupdate.asp"
Folder: Data - file "oaknoll.mdb
Folder: Include files: "ADOVBS.INC", "DSN.asp", "validator.asp"
file: aspbackup.asp
file: jobopenings.asp
file: jobs_edit.asp
file: test.asp



Could someone take a look and tell me why it is not working correctly? Any suggestions?

Here is the website: http://www.oaknoll.com


The job postings appear on a page under the "EMPLOYMENT" tab called "current positions".

Here is the code from the current positions page:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- #include virtual="/oaknoll/include/DSN.asp" -->

<%

Response.Expires = 0

function formatJobs (strIn)
	dim temp
	If strIn = "" or isnull (strIn) or isempty (strIn) Then
		temp = "- no current openings</p>"
	Else
		temp = "</p><p><blockquote>" & strIn & "</blockquote>"
	End If
	formatJobs = temp
end function

dim cn, rs, sql

'Open and verify connection to DB
set cn = server.CreateObject("ADODB.Connection")
cn.Open cnString("/data", "oaknoll.mdb")

sql = "SELECT * FROM jobopenings"
set rs = cn.Execute(sql)

%>


<html lang="en">
<head>
<title>Oaknoll - An Adult Retirement Community</title>
<meta name="Keywords"
 content="oaknoll, iowa city, retirement, elderly, iowa, LifeCare, retirement community, nursing home, apartment, independent living, resident, geriatric, aging, community, retire, retired, elder,  health care">
<meta name="Description"
 content="Oaknoll is an adult retirement community in Iowa City, Iowa.">
<meta name="Author" content="Heather Clark for Gazette Communications">
<meta name="robots" content="index,follow">


<!-- include Cycle plugin -->

<!-- include jQuery library -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<!-- include Cycle plugin -->
<script type="text/javascript" src="http://cloud.github.com/downloads/malsup/cycle/jquery.cycle.all.latest.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    $('.slideshow').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	    	
			});


$('#s3').cycle({ 
    fx:    'fade', 
    speed:  5500,
	cleartype: 1,
cleartypeNoBg: false,
height: 'auto',
containerResize: 0,

timeout: 8000,

sync: 0,

fadeOut:'slow', 



nowrap: 0,
randomizeEffects: 0,
pause: 0
	
	
 });

});
</script>

		

<!--Vertical Slider Navigation javascript - code on external page-->    
    
<script type="text/javascript" src="js/external_navigation_menu_javascript.js"></script>

 <!--endofVerticalSliderNavigationjavascript-->  

  
  
<!--tocorrecttheunsightlyFlashofUnstyledContenthttp://www.bluerobot.com/web/css/fouc.asp-->
	<script type="text/javascript"> </script>
	

	

<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="ie6.css" />
<![endif]-->


<link rel="stylesheet" href="../css/oaknoll_newsite.css" type="text/css" />
<link rel="stylesheet" href="../css/nav_css.css" type="text/css" />
<link rel="stylesheet" href="../css/employment.css" type="text/css" />



</head>
<body>

<div id="container">

 <!--#include virtual="includes/header_asp.asp"-->
		
      
       
        
		<div id="main">
         
         
        <div id="box1">
       <div class="slideshow">
		<img src="../images/sls/nurse_station.jpg" width="400" height="300" alt="Nurses Station" class="first" />
		
	   </div> <!--end-of-slideshow-->
        </div><!--end-box-1-->
        
        <div id="box2">                
   	  <div class="buttonbox"><img src="../images/4_special_buttons.jpg" alt="internet buttons" width="181" height="300" border="0" usemap="#Map" />
        <map name="Map" id="Map">
          <area shape="rect" coords="14,8,178,70" href="http://www.touchtown.tv/tv/tv/webshow/tv1.jsp?tag=OAKNOLL_WEB" target="_blank" alt="Link to Oaknoll Announcements" border="none" />
          <area shape="rect" coords="14,86,177,145" href="http://www.facebook.com/Oaknoll?ref=sgm" target="_blank" alt="Link to Oaknoll's Facebook Page" border="none"/>
          <area shape="rect" coords="16,161,172,213" href="http://oaknoll.blogspot.com/" target="_blank" alt="Link to the Oaknoll Blog" />
          <area shape="rect" coords="18,233,175,297" href="../hawkeye.asp" alt="Link to Golden Hawkeye Birthday Club" />
        </map>
   	  </div><!--BUTTONBOX--> 
        </div><!--end-box-2-->
        
  


<br>

  <h1 style="clear:left;">Current Job Openings...</h1>
          
          <p><b><u>Opportunities in Nursing</u> </b><%= formatJobs(cstr(rs("nursing"))) %> </p>
          <p> <b><u>Opportunities in Food & Nutrition</u></b><%= formatJobs(cstr(rs("food"))) %> </p>
          <p><b><u>Opportunities in Recreation and Social Services</u></b><%= formatJobs(cstr(rs("recreation"))) %> </p>
          <p><b><u>Opportunities in Building and Grounds</u></b><%= formatJobs(cstr(rs("building"))) %> </p>
          <p><b><u>Opportunities in Housekeeping and Laundry</u></b><%= formatJobs(cstr(rs("housekeeping"))) %> </p>
         <p><b><u>Opportunities in Administration</u></b><%= formatJobs(cstr(rs("admin"))) %> </p>
		  
		  <p> <b><i>To Apply:</i></b> <br />
            <br />
            <b><i> Click 
            <a href="../pdf/Application_2012_for_website.pdf" target="_blank">here</a> for 
            application.</i></b> </p>
		  <p align="left">            Print the application and mail the completed form to: </p>
          
          <table width="213" border="0" cellspacing="0" cellpadding="10" align="left">
            <tr> 
              <td><p>Oaknoll Retirement Residence<br />
                  Attn: Human Resources<br />
                  1 Oaknoll Court<br />
                  Iowa City, Iowa 52246</p></td>
            </tr>
            <tr>
              <td><p>or fax your application to: <br />
                (319) 466-3023<br />
                Attn: Human Resources</p></td>
            </tr>
          </table>
        
  
  </div>
        
        
     <!--#include virtual="includes/menu_asp.asp"-->

 
        
	 <!--#include virtual="includes/footer_asp.asp"-->     
      

  
  </div><!--end-of-main-->
</div><!--end-of-container-->
  
</div>
</body>
</html>

Here is the code from the "jobs_edit.asp" page:


Code:
<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<!-- #include virtual="/oaknoll/include/DSN.asp" -->

<head>
<title>Oaknoll - An Adult Retirement Community</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords"
 content="oaknoll, iowa city, retirement, elderly, iowa, LifeCare, retirement community, nursing home, apartment, independent living, resident, geriatric, aging, community, retire, retired, elder,  health care, assisted living, nursing care">
<meta name="Description"
 content="Oaknoll is an adult retirement community in Iowa City, Iowa.">
<meta name="robots" content="index,follow">

<!-- code for employment update form begins here -->


<%

Response.Expires = 0

function brtagFixer(strIn)
    
    dim temp
    
	temp = replace(strIn, "<br>", vbcrlf)

    brtagFixer = temp
      
  end function

dim cn, rs, sql

'Open and verify connection to DB
set cn = server.CreateObject("ADODB.Connection")
cn.Open cnString("\data", "oaknoll.mdb")

sql = "SELECT * FROM jobopenings"
set rs = cn.Execute(sql)

%>


<!-- code for employment update form ends here -->





<!-- include Cycle plugin SLIDESHOW -->

<!-- include jQuery library -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<!-- include Cycle plugin -->
<script type="text/javascript" src="http://cloud.github.com/downloads/malsup/cycle/jquery.cycle.all.latest.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    $('.slideshow').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	    	
			});


   
$('#s3').cycle({ 
    fx:    'fade', 
	
    speed:  8500,
	
	cleartype: 1,
cleartypeNoBg: false,
height: 'auto',
containerResize: 0,

timeout: 2000,

sync: 0,

fadeOut:'slow', 



nowrap: 0,
randomizeEffects: 0,
pause: 2
	


});
	
	
	


});
</script>


 <!--Vertical Slider Navigation javascript - code on external page-->    
    
<script type="text/javascript" src="js/external_navigation_menu_javascript.js"></script>

 <!--endofVerticalSliderNavigationjavascript-->  


		
 
  
<!--tocorrecttheunsightlyFlashofUnstyledContenthttp://www.bluerobot.com/web/css/fouc.asp-->
	<script type="text/javascript"> </script>
	

	

<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="ie6.css" />
<![endif]-->


<link rel="stylesheet" href="../css/oaknoll_newsite.css" type="text/css" />
<link rel="stylesheet" href="../css/nav_css.css" type="text/css" />

</head>

<body>

<div id="container">

 <!--#include virtual="includes/header_asp.asp"-->
		
      
       
        
		<div id="main">
         
         
        <div id="box1">
       <div class="slideshow">
		<img src="../images/sls/nurse_station.jpg" width="400" height="300" alt="Nurses Station" class="first" />
		</div> <!--end-of-slideshow-->
        </div><!--end-box-1-->
        
        <div id="box2">                
   	  <div class="buttonbox"><img src="../images/4_special_buttons.jpg" alt="internet buttons" width="181" height="300" border="0" usemap="#Map" />
        <map name="Map" id="Map">
          <area shape="rect" coords="14,8,178,70" href="http://www.touchtown.tv/tv/tv/webshow/tv1.jsp?tag=OAKNOLL_WEB" target="_blank" alt="Link to Oaknoll Announcements" border="none" />
          <area shape="rect" coords="14,86,177,145" href="http://www.facebook.com/Oaknoll?ref=sgm" target="_blank" alt="Link to Oaknoll's Facebook Page" border="none"/>
          <area shape="rect" coords="16,161,172,213" href="http://oaknoll.blogspot.com/" target="_blank" alt="Link to the Oaknoll Blog" />
          <area shape="rect" coords="18,233,175,297" href="hawkeye.asp" alt="Link to Golden Hawkeye Birthday Club" />
        </map>
   	  </div><!--BUTTONBOX--> 
        </div><!--end-box-2-->
        
  
   
   <h1 style="clear:left;">Update Job Opportunites...</h1>
  
  
   <form action="jobsupdate.asp" method="post">
            <p><b><i><font size="+2">Current Job Openings </font></i></b></p>
           
		    <p><b><u><font size="2">Opportunities in Nursing</font></u></b></p>
            <blockquote> 
              <textarea name="nursing" cols="50" rows="8"><%= brtagfixer(cstr(rs("nursing"))) %></textarea>
            </blockquote>
            <p> <b><u><font size="2">Opportunities in Food & Nutrition</font></u></b> 
            </p>
            <p> </p>
            <blockquote> 
              <textarea name="food" cols="50" rows="8"><%= brtagfixer(cstr(rs("food"))) %></textarea>
            </blockquote>
            <p><b><u><font size="2">Opportunities in Recreation</font></u></b> 
            </p>
            <p> </p>
            <blockquote> 
              <textarea name="recreation" cols="50" rows="8"><%= brtagfixer(cstr(rs("recreation"))) %></textarea>
            </blockquote>
          
		   <p><b><u><font size="2">Opportunities in Building and Grounds</font></u></b></p>
            <p> </p>
            <blockquote> 
              <textarea name="building" cols="50" rows="8"><%= brtagfixer(cstr(rs("building"))) %></textarea>
            </blockquote>
		  
		  		  
		    <p><b><u><font size="2">Opportunities in Housekeeping and Laundry</font></u></b></p>
            <p> </p>
            <blockquote> 
              <textarea name="housekeeping" cols="50" rows="8"><%= brtagfixer(cstr(rs("housekeeping"))) %></textarea>
            </blockquote>
           
           			
			
			 <p><b><u><font size="2">Opportunities in Administration</font></u></b></p>
            <p> </p>
            <blockquote> 
              <textarea name="admin" cols="50" rows="8"><%= brtagfixer(cstr(rs("admin"))) %></textarea>
            </blockquote>
			
            <p align="center"> 
              <input type="submit" name="Submit" value="Submit Changes" />
              &nbsp;&nbsp; 
              <input type="reset" name="reset" value="Discard Changes" />
            </p>
          </form>
  
  
        
</div>
        
        
     
      

   <!--#include virtual="includes/menu_asp.asp"-->

 
        
	 <!--#include virtual="includes/footer_asp.asp"-->
  
 
  </div><!--end-of-main-->
</div><!--end-of-container-->
</body>
</html>
When I try to do a test on the jobs_edit.asp form and hit submit, I get an error message. In the browser URL address is a link to http://www.oaknoll.com/oaknoll/jobsupdate.asp. On the server, the jobsupdate.asp file is actually located in the oaknoll file in another file called "admin". http://www.oaknoll.com/oaknoll/admin/jobsupdate.asp.


Here is the code for the jobsupdate.asp page if it helps....

Code:
<!-- #include virtual="oaknoll/include/ADOVBS.INC" -->
<!-- #include virtual="oaknoll/include/validator.asp" -->
<!-- #include virtual="oaknoll/include/DSN.asp" -->

<%
On Error Resume Next

Response.Buffer = true
Response.Expires = 0

dim cn                                  'Connection object
dim rs                                  'Recordset objects
dim sql                                 'Work variable for SQL statement

dim nursing, food, recreation, housekeeping, building, admin

dim updtStatus                          'Return value for success/fail
dim rowsAffected                        'Number of rows updated by command
dim updtError

'Initialize variables

nursing			= request("nursing")
food			= request("food")
recreation		= request("recreation")
housekeeping	= request("housekeeping")
building		= request("building")
admin			= request("admin")

updtStatus = ""

'Open and verify connection to DB
set cn = server.CreateObject("ADODB.Connection")
cn.Open cnString("\data", "oaknoll.mdb")
if cn.State = adStateClosed then
  Response.Write("ERROR: Database is NOT open")
end if

sql = ""                                'Clear out temp SQL buffer
%>

<html><head><title>Updating</title>
</head>
<body bgcolor="white" leftMargin="0" link="#006600" text="#000000" topMargin="0" vLink="#800080" MARGINWIDTH="0" MARGINHEIGHT="0">

<font size="2"><b><i>Updating... Please Wait</i></b></font>

<%
'Build the SQL command for the item we're updating
      sql =       "UPDATE jobopenings"
      sql = sql & "  SET nursing = '"		& stringFixer(nursing) & "',"
      sql = sql & "      food = '"			& stringFixer(food) & "', "
      sql = sql & "      recreation = '"	& stringFixer(recreation) & "', "
      sql = sql & "      housekeeping = '"	& stringFixer(housekeeping) & "', "
	  sql = sql & "      building = '" 		& stringFixer(building) & "', "
	  sql = sql & "      admin = '" 		& stringFixer(admin) & "'"
   
   'response.write("sql:<br>" & sql)
   'response.end
  
'Run the SQL command
  cn.Execute sql, rowsAffected, adExecuteNoRecords
  
  if err.number <> 0 and err.number <> 3021 then
    Response.Write "<b>An error occurred while updating the database.<br>"
    Response.Write "Please notify the system administrator.</b><br>"
    Response.Write "<br>"
    Response.Write "Error Number: " & err.number & "<br>"
    Response.Write "Error Text: <br>"
  
    for errCt = 0 to cn.Errors.Count - 1
      Response.Write cn.Errors.Item(errCt).Description & "<br>"
    next
    
    msg = "An error occurred while updating the database.<br>"
    msg = msg & "  Please notify the system administrator."
    msg = msg & " [" & err.number & "]"
    
    'updtError = true
    updtStatus = "ERR"
  else
    Response.Write rowsAffected & " records were updated."
    'updtError = false
    updtStatus = "OK"
  end if

'Close connection to DB
cn.Close

'Garbage collection
set rs = nothing
set cn = nothing

'Redirect back to maintenance screen
if updtStatus <> "ERR" then
      Response.Redirect "jobs_edit.asp"
end if
%>
</body></html>

Sorry about all the code. I'm just not sure what you would need to help figure this problem out.

Thanks for any suggestions you might be able to provide.

Sarb