Link to home
Start Free TrialLog in
Avatar of MGostischa
MGostischa

asked on

Syntax error in UPDATE statement

I am using Dreamweaver MX and the Update Record Server Behavior. I am getting the following error when I add the NOTE field to the update query

VENDORERRORCODE   -3503
SQLSTATE   42000

Attached is the code:

 <cfquery datasource="WorkOrder">
  UPDATE TASKS SET TASK=
  <cfif IsDefined("FORM.TASK") AND #FORM.TASK# NEQ "">
    '#FORM.TASK#'
    <cfelse>
    NULL
  </cfif>
  , TYPE=
  <cfif IsDefined("FORM.TYPE") AND #FORM.TYPE# NEQ "">
    '#FORM.TYPE#'
    <cfelse>
    NULL
  </cfif>
  , REQUEST=
  <cfif IsDefined("FORM.REQUEST") AND #FORM.REQUEST# NEQ "">
    '#FORM.REQUEST#'
    <cfelse>
    NULL
  </cfif>
  , CLSDDATE=
  <cfif IsDefined("FORM.COMPDATE") AND #FORM.COMPDATE# NEQ "">
    ###FORM.COMPDATE###
    <cfelse>
    NULL
  </cfif>
  , PRIORITY=
  <cfif IsDefined("FORM.PRIORITY") AND #FORM.PRIORITY# NEQ "">
    '#FORM.PRIORITY#'
    <cfelse>
    NULL
  </cfif>
  , DUEDATE=
  <cfif IsDefined("FORM.DUEDATE") AND #FORM.DUEDATE# NEQ "">
    ###FORM.DUEDATE###
    <cfelse>
    NULL
  </cfif>
  , RESPONS=
  <cfif IsDefined("FORM.TECH") AND #FORM.TECH# NEQ "">
    '#FORM.TECH#'
    <cfelse>
    NULL
  </cfif>
  , ASSNDATE=
  <cfif IsDefined("FORM.ASSNDATE") AND #FORM.ASSNDATE# NEQ "">
    '#FORM.ASSNDATE#'
    <cfelse>
    NULL
  </cfif>
  , COMPLETED=
  <cfif IsDefined("FORM.COMPDATE") AND #FORM.COMPDATE# NEQ "">
    ###FORM.COMPDATE###
    <cfelse>
    NULL
  </cfif>
  , HOURS=
  <cfif IsDefined("FORM.HOURS") AND #FORM.HOURS# NEQ "">
    #FORM.HOURS#
    <cfelse>
    NULL
  </cfif>
  , WS_NUM=
  <cfif IsDefined("FORM.WS_NUM") AND #FORM.WS_NUM# NEQ "">
    #FORM.WS_NUM#
    <cfelse>
    NULL
  </cfif>
  , DEPT=
  <cfif IsDefined("FORM.DEPT") AND #FORM.DEPT# NEQ "">
    '#FORM.DEPT#'
    <cfelse>
    NULL
  </cfif>
  , PHONE=
  <cfif IsDefined("FORM.PHONE") AND #FORM.PHONE# NEQ "">
    '#FORM.PHONE#'
    <cfelse>
    NULL
  </cfif>
  , PHONE_EXT=
  <cfif IsDefined("FORM.PHONE_EXT") AND #FORM.PHONE_EXT# NEQ "">
    '#FORM.PHONE_EXT#'
    <cfelse>
    NULL
  </cfif>
  , LOCATION=
  <cfif IsDefined("FORM.LOCATION") AND #FORM.LOCATION# NEQ "">
    '#FORM.LOCATION#'
    <cfelse>
    NULL
  </cfif>
  , DESCRIPT=
  <cfif IsDefined("FORM.DESCRIPT") AND #FORM.DESCRIPT# NEQ "">
    '#FORM.DESCRIPT#'
    <cfelse>
    NULL
  </cfif>
  , NOTE=
  <cfif IsDefined("FORM.RESOL") AND #FORM.RESOL# NEQ "">
    '#FORM.RESOL#'
    <cfelse>
    NULL
  </cfif>
  , AWS_NUM=
  <cfif IsDefined("FORM.AWS_NUM") AND #FORM.AWS_NUM# NEQ "">
    '#FORM.AWS_NUM#'
    <cfelse>
    NULL
  </cfif>
  , LOOKUP2=
  <cfif IsDefined("FORM.DETAIL") AND #FORM.DETAIL# NEQ "">
    '#FORM.DETAIL#'
    <cfelse>
    NULL
  </cfif>
  , EMAILADDR=
  <cfif IsDefined("FORM.EMAILADDR") AND #FORM.EMAILADDR# NEQ "">
    '#FORM.EMAILADDR#'
    <cfelse>
    NULL
  </cfif>
  WHERE WO_NUM=#FORM.WO_Num#
  </cfquery>
 
Thank you in advance and let me know if any additional information is needed.
Avatar of winningl
winningl

hi,

Most likely, you have a mismatch data type, say for a int field you put single quote around data or for a string you forgot tht single quote. Check your table description.

winningl
can u print the output of this query & see what it gives.

i have a doubt abt teh "###" that u ahve surrounding the compdate & duedate. i dont know why u wld 3 of them there !

also chk up on what winning has mentioned above

numeric data shld not be enclosed in single quotes.
& text/varchar data shld be in single quotes

date datatype shld be used as #createodbcdate(compdate)# & #createodbcdate(duedate)# instead of just as ###FORM.COMPDATE### & ###FORM.DUEDATE### respectively

let me know

K'Rgds
Anand

I would agree with anandkp check your tables and the data types they're expecting.
I might find this somewhat usefull :

https://www.experts-exchange.com/questions/20384232/cfinsert-tag.html
https://www.experts-exchange.com/questions/20383735/syntax-error-adding-records.html

theu kinda match your prblem

regards,
idss


(1)
He said "NOTE field" I guess that field of type "text"
i.e. not char or varchar, but free text field, so It needs special treatment based on database  and odbc or jdbc data source

(2)
It could be the data itself , has something like # or , that break coldfusion, so try to test using easy simple content


(3)
Try to test using a hardcoding value so we can close to the main problem, something like
, NOTE= "Hello"
 
(4) Also test your script using NULL
, NOTE= NULL


I used to have problem with this NULL




Avatar of MGostischa

ASKER

I will test all of these on Monday. Once again all works as planned except the NOTE update. I take that out and it's fine. The NOTE UPDATE is a memo field. Thanks for the input so far.
Yes "MEMO" field, that's what I expected

In your HTML form, make sure you have textarea for "notes" field

<textarea name="note">#somevalue</textarea>

Ok, tried all of the suggestions. Date fields are Text. I have corrected so that dates are now entered like :#createodbcdate(compdate)#. NOTE is a Memo field and defined as textarea. I have tried setting Note='HELLO' and Note=NULL without any luck. Once again, I comment out the NOTE= and it works fine. I will past the entire html here to see if that helps.

<script language="javascript" src="cal3.js"></script>
<script language="javascript" src="cal_conf3.js"></script>
<cfparam name="URL.recordID" default="1">
<cfset CurrentPage=GetFileFromPath(GetTemplatePath())>
<cfif IsDefined("FORM.MM_UpdateRecord") AND FORM.MM_UpdateRecord EQ "techupdate">
  <cfquery datasource="WORKORDER">
  UPDATE TASKS SET TASK=
  <cfif IsDefined("FORM.TASK") AND #FORM.TASK# NEQ "">
    '#FORM.TASK#'
    <cfelse>
    NULL
  </cfif>
  , TYPE=
  <cfif IsDefined("FORM.TYPE") AND #FORM.TYPE# NEQ "">
    '#FORM.TYPE#'
    <cfelse>
    NULL
  </cfif>
  , REQUEST=
  <cfif IsDefined("FORM.REQUEST") AND #FORM.REQUEST# NEQ "">
    '#FORM.REQUEST#'
    <cfelse>
    NULL
  </cfif>
  , CLSDDATE=
  <cfif IsDefined("FORM.COMPDATE") AND #FORM.COMPDATE# NEQ "">
     #createodbcdate(compdate)#  
    <cfelse>
    NULL
  </cfif>
  , PRIORITY=
  <cfif IsDefined("FORM.PRIORITY") AND #FORM.PRIORITY# NEQ "">
    '#FORM.PRIORITY#'
    <cfelse>
    NULL
  </cfif>
  , DUEDATE=
  <cfif IsDefined("FORM.DUEDATE") AND #FORM.DUEDATE# NEQ "">
    #createodbcdate(duedate)#  
    <cfelse>
    NULL
  </cfif>
  , RESPONS=
  <cfif IsDefined("FORM.TECH") AND #FORM.TECH# NEQ "">
    '#FORM.TECH#'
    <cfelse>
    NULL
  </cfif>
  , ASSNDATE=
  <cfif IsDefined("FORM.ASSNDATE") AND #FORM.ASSNDATE# NEQ "">
    '#FORM.ASSNDATE#'
    <cfelse>
    NULL
  </cfif>
  , COMPLETED=
  <cfif IsDefined("FORM.COMPDATE") AND #FORM.COMPDATE# NEQ "">
    #createodbcdate(compdate)#
    <cfelse>
    NULL
  </cfif>
  , HOURS=
  <cfif IsDefined("FORM.HOURS") AND #FORM.HOURS# NEQ "">
    #FORM.HOURS#
    <cfelse>
    NULL
  </cfif>
  , WS_NUM=
  <cfif IsDefined("FORM.WS_NUM") AND #FORM.WS_NUM# NEQ "">
    #FORM.WS_NUM#
    <cfelse>
    NULL
  </cfif>
  , DEPT=
  <cfif IsDefined("FORM.DEPT") AND #FORM.DEPT# NEQ "">
    '#FORM.DEPT#'
    <cfelse>
    NULL
  </cfif>
  , PHONE=
  <cfif IsDefined("FORM.PHONE") AND #FORM.PHONE# NEQ "">
    '#FORM.PHONE#'
    <cfelse>
    NULL
  </cfif>
  , PHONE_EXT=
  <cfif IsDefined("FORM.PHONE_EXT") AND #FORM.PHONE_EXT# NEQ "">
    '#FORM.PHONE_EXT#'
    <cfelse>
    NULL
  </cfif>
  , LOCATION=
  <cfif IsDefined("FORM.LOCATION") AND #FORM.LOCATION# NEQ "">
    '#FORM.LOCATION#'
    <cfelse>
    NULL
  </cfif>
  , DESCRIPT=
  <cfif IsDefined("FORM.DESCRIPT") AND #FORM.DESCRIPT# NEQ "">
    '#FORM.DESCRIPT#'
    <cfelse>
    NULL
  </cfif>
  , NOTE=
  <cfif IsDefined("FORM.NOTE") AND #FORM.NOTE# NEQ "">
    '#FORM.NOTE#'
    <cfelse>
    NULL
  </cfif>--->
  , AWS_NUM=
  <cfif IsDefined("FORM.AWS_NUM") AND #FORM.AWS_NUM# NEQ "">
    '#FORM.AWS_NUM#'
    <cfelse>
    NULL
  </cfif>
  , LOOKUP2=
  <cfif IsDefined("FORM.DETAIL") AND #FORM.DETAIL# NEQ "">
    '#FORM.DETAIL#'
    <cfelse>
    NULL
  </cfif>
  , EMAILADDR=
  <cfif IsDefined("FORM.EMAILADDR") AND #FORM.EMAILADDR# NEQ "">
    '#FORM.EMAILADDR#'
    <cfelse>
    NULL
  </cfif>
  WHERE WO_NUM=#FORM.WO_Num#
  </cfquery>
  <cflocation url="tech.cfm">
</cfif>
<cfquery name="Work_Order" datasource="WORKORDER">
SELECT * FROM TASKS WHERE WO_NUM = #URL.recordID# ORDER BY WO_NUM ASC
</cfquery>
<cfquery name="Techs" datasource="WORKORDER">
SELECT * FROM STAF
</cfquery>
<cfquery name="DetailType" datasource="WORKORDER">
SELECT LOOKUP2 FROM USERLOOKUP2 ORDER BY LOOKUP2 ASC
</cfquery>
<cfquery name="Priority" datasource="WORKORDER">
SELECT * FROM PRIORITY ORDER BY PRIORITY ASC
</cfquery>
<html>
<head>
<title>Tech Details/Update</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body leftmargin="5" topmargin="5">
<form action="<cfoutput>#CurrentPage#</cfoutput>" method="POST" name="techupdate" id="techupdate">
  <table width="692" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="78"><img src="stateseal_color_smTrans.gif" width="60" height="60"></td>
      <td width="350"><font size="+1" face="Arial, Helvetica, sans-serif">12th
        Judicial Circuit<br>
        <font size="+2">C</font>ourt <font size="+2">A</font>dministration <font size="+2">T</font>echnology
        <font size="+2">S</font>ervices</font></td>
      <td width="29" align="right" valign="top"><p>&nbsp;</p></td>
      <td width="217" align="right" valign="top"><div align="left"><font size="-2">Court
          Technology Officer - **********<br>
          Network Administrator - **********<br>
          Network Administrator - **********<br>
          Help Desk Support - **********<br>
          Network Administrator - **********</font></div></td>
    </tr>
  </table>
  <table width="692" border="0" align="center">
    <tr>
      <td width="784"><table width="692" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="707" align="center" valign="middle" bgcolor="#0000CC">
              <font color="#FFFFFF" size="+1" face="Arial, Helvetica, sans-serif">CATS
              Help Desk Technician Area</font></td>
          </tr>
        </table>
        <table width="692" border="0" cellpadding="0" cellspacing="0" bgcolor="#666666">
          <tr>
            <td width="393"><div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Requestor</font></div></td>
            <td width="295"><div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Task</font></div></td>
            <td width="10">&nbsp;</td>
          </tr>
        </table>
        <table width="695" height="223" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td> <table width="237" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="237"> <table width="389" height="223" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#000000">
                      <tr>
                        <td width="389"><table width="387" height="221" border="0" align="center" bgcolor="#CCCCCC" font size="-1">
                            <tr>
                              <td width="77"><font size="-1">Work Order:</font></td>
                              <td width="110"><input name="WO_Num" type="text" tabindex=-1 id="WO_Num2" value="<cfoutput>#Work_Order.WO_NUM#</cfoutput>" onFocus="this.blur()" size="2"></td>
                              <td width="46"><div align="right"><font size="-1">Serial
                                  :</font></div></td>
                              <td width="136"><input name="AWS_NUM" type="text" id="AWS_NUM3" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.AWS_NUM#</cfoutput>" size="12"></td>
                            </tr>
                            <tr>
                              <td><font size="-1">Requestor:</font></td>
                              <td colspan="3"><font size="-1">
                                <input name="REQUEST" type="text" id="REQUEST3" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.REQUEST#</cfoutput>" size="32">
                                </font></td>
                            </tr>
                            <tr>
                              <td><font size="-1">Phone:</font></td>
                              <td><input name="PHONE" type="text" id="PHONE3" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.PHONE#</cfoutput>" size="12"></td>
                              <td><div align="right"><font size="-1"> Ext:</font>
                                </div></td>
                              <td><input name="PHONE_EXT" type="text" id="PHONE_EXT3" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.PHONE_EXT#</cfoutput>" size="5"></td>
                            </tr>
                            <tr>
                              <td><font size="-1">E-mail:</font></td>
                              <td colspan="3"><font size="-1">
                                <input name="EMAILADDR" type="text" id="EMAILADDR3" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.EMAILADDR#</cfoutput>" size="32">
                                </font></td>
                            </tr>
                            <tr>
                              <td><font size="-1">Department:</font></td>
                              <td colspan="3"><font size="-1">
                                <input name="DEPT" type="text" id="DEPT3" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.DEPT#</cfoutput>" size="32">
                                </font></td>
                            </tr>
                            <tr>
                              <td><font size="-1">Location:</font></td>
                              <td colspan="3"><font size="-1">
                                <input name="LOCATION" type="text" tabindex=-1 id="location2" value="<cfoutput>#Work_Order.LOCATION#</cfoutput>" onFocus="this.blur()" size="32">
                                </font></td>
                            </tr>
                            <tr>
                              <td><font size="-1">Workstation:</font></td>
                              <td colspan="3"><font size="-1">
                                <input name="WS_NUM" type="text" id="WS_NUM3" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.WS_NUM#</cfoutput>" size="3">
                                <input name="updated" type="hidden" id="hiddenField3" value="Now()">
                                <input name="status" type="hidden" id="status" value="Pending">
                                </font></td>
                            </tr>
                            <tr>
                              <td colspan="4">&nbsp;</td>
                            </tr>
                          </table /font></td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
            <td width="298"> <table width="292" height="223" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="464" valign="middle" bgcolor="#000000"> <table width="290" height="207" border="0" align="center" bgcolor="#CCCCCC">
                      <tr>
                        <td width="288"><font size="-1">Summary:</font></td>
                      </tr>
                      <tr>
                        <td><input name="TASK" type="text" id="TASK" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.TASK#</cfoutput>" size="40"></td>
                      </tr>
                      <tr>
                        <td><font size="-1">Trouble Type: </font></td>
                      </tr>
                      <tr>
                        <td><input name="TYPE" type="text" id="TYPE" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.TYPE#</cfoutput>" size="40"></td>
                      </tr>
                      <tr>
                        <td><font size="-1">Detailed Description of Problem:</font></td>
                      </tr>
                      <tr>
                        <td> <font size="-1">
                          <textarea name="DESCRIPT" cols="32" rows="6" id="textarea" tabindex=-1 onFocus="this.blur()"><cfoutput>#Work_Order.DESCRIPT#</cfoutput></textarea>
                          </font> </td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
          </tr>
        </table></td>
    </tr>
  </table>
  <table width="692" border="0" align="center">
    <tr>
      <td width="784"> <table width="692" border="0" cellpadding="0" cellspacing="0" bgcolor="#666666">
          <tr>
            <td width="393"><div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Resolution</font></div></td>
            <td width="295">&nbsp;</td>
            <td width="10">&nbsp;</td>
          </tr>
        </table>
        <table width="695" height="223" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td> <table width="237" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="237"> <table width="389" height="223" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#000000">
                      <tr>
                        <td width="389"><table width="387" height="221" border="0" align="center" bgcolor="#CCCCCC" font size="-1">
                            <tr>
                              <td width="74"><font size="-1">Assigned to:</font></td>
                              <td width="303"> <select tabindex=6 name="TECH" id="TECH">
                                  <cfoutput query="Techs">
                                    <option value="#Techs.NAME#" <cfif (isDefined("Work_Order.RESPONS") AND Techs.NAME EQ Work_Order.RESPONS)>selected</cfif>>#Techs.NAME#</option>
                                  </cfoutput> </select></td>
                            </tr>
                            <tr>
                              <td><font size="-1">Priority:</font></td>
                              <td><font size="-1">
                                <select tabindex=7 name="PRIORITY" id="PRIORITY">
                                  <cfoutput query="Priority">
                                    <option value="#Priority.PRIORITY#" <cfif (isDefined("Work_Order.PRIORITY") AND Priority.PRIORITY EQ Work_Order.PRIORITY)>selected</cfif>>#Priority.PRIORITY#</option>
                                  </cfoutput>
                                </select>
                                </font></td>
                            </tr>
                            <tr>
                              <td><font size="-1">Detail Type:</font></td>
                              <td> <select tabindex=8 name="DETAIL" id="DETAIL">
                                  <cfoutput query="DetailType">
                                    <option value="#DetailType.LOOKUP2#">#DetailType.LOOKUP2#</option>
                                  </cfoutput> </select> <font size="-1">
                                <input name="status2" type="hidden" id="status22" value="Pending">
                                </font> </td>
                            </tr>
                            <tr>
                              <td colspan="2"> <div align="left"><font size="-1">Resolution:</font></div></td>
                            </tr>
                            <tr>
                              <td colspan="2"><font size="-1">
                                <textarea name="NOTE" cols="43" rows="6" id="NOTE" tabindex=1>
</textarea>
                                </font></td>
                            </tr>
                          </table /font></td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
            <td width="298"> <table width="292" height="223" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="464" valign="middle" bgcolor="#000000"> <table width="290" height="221" border="0" align="center" bgcolor="#CCCCCC">
                      <tr>
                        <td width="94"><font size="-1">Assign Date:</font></td>
                        <td width="186"><input name="ASSNDATE" type="text" id="ASSNDATE" tabindex=2 value="<cfoutput>#LSDateFormat(Work_Order.ASSNDATE,'M/DD/YY')#</cfoutput>" size=20>
                          <small><a href="javascript:showCal('Calendar1')" tabindex=-1><img src="date.gif" width="19" height="17" border="0"></a></small>
                        </td>
                      </tr>
                      <tr>
                        <td><font size="-1">Due Date:</font> </td>
                        <td><input name="DUEDATE" type="text" id="DUEDATE" tabindex=3 value="<cfoutput>#LSDateFormat(Work_Order.DUEDATE,'M/DD/YY')#</cfoutput>" size=20>
                          <small><a href="javascript:showCal('Calendar2')" tabindex=-1><img src="date.gif" width="19" height="17" border="0"></a></small>
                        </td>
                      </tr>
                      <tr>
                        <td><font size="-1">Completed Date: </font></td>
                        <td><input name="COMPDATE" type="text" id="COMPDATE" tabindex=4 value="<cfoutput>#LSDateFormat(Work_Order.COMPLETED,'M/DD/YY')#</cfoutput>" size=20>
                          <small><a href="javascript:showCal('Calendar3')" tabindex=-1><img src="date.gif" width="19" height="17" border="0"></a></small></td>
                      </tr>
                      <tr>
                        <td><font size="-1">Hours Invested:</font></td>
                        <td><input name="HOURS" type="text" id="HOURS" tabindex=5 value="<cfoutput>#Work_Order.HOURS#</cfoutput>" size="6"></td>
                      </tr>
                      <tr>
                        <td colspan="2">&nbsp;</td>
                      </tr>
                      <tr>
                        <td colspan="2"> </td>
                      </tr>
                      <tr>
                        <td colspan="2"><font size="-1">Work_Order.Lookup2 =</font>
                          <cfoutput>#Work_Order.LOOKUP2#</cfoutput></td>
                      </tr>
                      <tr>
                        <td colspan="2">&nbsp;</td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
          </tr>
        </table></td>
    </tr>
  </table>
  <div align="center">
    <input type="submit" name="Submit" value="Submit">
    <input type="reset" name="Submit2" value="Reset">
    <br>
    <input type="hidden" name="MM_UpdateRecord" value="techupdate">
  </div>
</form>
<p>&nbsp;</p>
<script>
var mydate=new Date()
var theyear=mydate.getYear()
if (theyear < 1000)
theyear+=1900
var theday=mydate.getDay()
var themonth=mydate.getMonth()+1
if (themonth<10)
themonth="0"+themonth
var theday=mydate.getDate()
if (theday<10)
theday="0"+theday

//////EDIT below three variable to customize the format of the date/////

var displayfirst=themonth
var displaysecond=theday
var displaythird=theyear
//document.techupdate.DUEDATE.value=displayfirst+"/"+displaysecond+"/"+displaythird//

</script>
<script language="JavaScript"><!--
document.techupdate.RESOL.focus();
//--></script>

</body>
</html>
 
Ok, tried all of the suggestions. Date fields are Text. I have corrected so that dates are now entered like :#createodbcdate(compdate)#. NOTE is a Memo field and defined as textarea. I have tried setting Note='HELLO' and Note=NULL without any luck. Once again, I comment out the NOTE= and it works fine. I will past the entire html here to see if that helps.

<script language="javascript" src="cal3.js"></script>
<script language="javascript" src="cal_conf3.js"></script>
<cfparam name="URL.recordID" default="1">
<cfset CurrentPage=GetFileFromPath(GetTemplatePath())>
<cfif IsDefined("FORM.MM_UpdateRecord") AND FORM.MM_UpdateRecord EQ "techupdate">
  <cfquery datasource="WORKORDER">
  UPDATE TASKS SET TASK=
  <cfif IsDefined("FORM.TASK") AND #FORM.TASK# NEQ "">
    '#FORM.TASK#'
    <cfelse>
    NULL
  </cfif>
  , TYPE=
  <cfif IsDefined("FORM.TYPE") AND #FORM.TYPE# NEQ "">
    '#FORM.TYPE#'
    <cfelse>
    NULL
  </cfif>
  , REQUEST=
  <cfif IsDefined("FORM.REQUEST") AND #FORM.REQUEST# NEQ "">
    '#FORM.REQUEST#'
    <cfelse>
    NULL
  </cfif>
  , CLSDDATE=
  <cfif IsDefined("FORM.COMPDATE") AND #FORM.COMPDATE# NEQ "">
     #createodbcdate(compdate)#  
    <cfelse>
    NULL
  </cfif>
  , PRIORITY=
  <cfif IsDefined("FORM.PRIORITY") AND #FORM.PRIORITY# NEQ "">
    '#FORM.PRIORITY#'
    <cfelse>
    NULL
  </cfif>
  , DUEDATE=
  <cfif IsDefined("FORM.DUEDATE") AND #FORM.DUEDATE# NEQ "">
    #createodbcdate(duedate)#  
    <cfelse>
    NULL
  </cfif>
  , RESPONS=
  <cfif IsDefined("FORM.TECH") AND #FORM.TECH# NEQ "">
    '#FORM.TECH#'
    <cfelse>
    NULL
  </cfif>
  , ASSNDATE=
  <cfif IsDefined("FORM.ASSNDATE") AND #FORM.ASSNDATE# NEQ "">
    '#FORM.ASSNDATE#'
    <cfelse>
    NULL
  </cfif>
  , COMPLETED=
  <cfif IsDefined("FORM.COMPDATE") AND #FORM.COMPDATE# NEQ "">
    #createodbcdate(compdate)#
    <cfelse>
    NULL
  </cfif>
  , HOURS=
  <cfif IsDefined("FORM.HOURS") AND #FORM.HOURS# NEQ "">
    #FORM.HOURS#
    <cfelse>
    NULL
  </cfif>
  , WS_NUM=
  <cfif IsDefined("FORM.WS_NUM") AND #FORM.WS_NUM# NEQ "">
    #FORM.WS_NUM#
    <cfelse>
    NULL
  </cfif>
  , DEPT=
  <cfif IsDefined("FORM.DEPT") AND #FORM.DEPT# NEQ "">
    '#FORM.DEPT#'
    <cfelse>
    NULL
  </cfif>
  , PHONE=
  <cfif IsDefined("FORM.PHONE") AND #FORM.PHONE# NEQ "">
    '#FORM.PHONE#'
    <cfelse>
    NULL
  </cfif>
  , PHONE_EXT=
  <cfif IsDefined("FORM.PHONE_EXT") AND #FORM.PHONE_EXT# NEQ "">
    '#FORM.PHONE_EXT#'
    <cfelse>
    NULL
  </cfif>
  , LOCATION=
  <cfif IsDefined("FORM.LOCATION") AND #FORM.LOCATION# NEQ "">
    '#FORM.LOCATION#'
    <cfelse>
    NULL
  </cfif>
  , DESCRIPT=
  <cfif IsDefined("FORM.DESCRIPT") AND #FORM.DESCRIPT# NEQ "">
    '#FORM.DESCRIPT#'
    <cfelse>
    NULL
  </cfif>
  , NOTE=
  <cfif IsDefined("FORM.NOTE") AND #FORM.NOTE# NEQ "">
    '#FORM.NOTE#'
    <cfelse>
    NULL
  </cfif>--->
  , AWS_NUM=
  <cfif IsDefined("FORM.AWS_NUM") AND #FORM.AWS_NUM# NEQ "">
    '#FORM.AWS_NUM#'
    <cfelse>
    NULL
  </cfif>
  , LOOKUP2=
  <cfif IsDefined("FORM.DETAIL") AND #FORM.DETAIL# NEQ "">
    '#FORM.DETAIL#'
    <cfelse>
    NULL
  </cfif>
  , EMAILADDR=
  <cfif IsDefined("FORM.EMAILADDR") AND #FORM.EMAILADDR# NEQ "">
    '#FORM.EMAILADDR#'
    <cfelse>
    NULL
  </cfif>
  WHERE WO_NUM=#FORM.WO_Num#
  </cfquery>
  <cflocation url="tech.cfm">
</cfif>
<cfquery name="Work_Order" datasource="WORKORDER">
SELECT * FROM TASKS WHERE WO_NUM = #URL.recordID# ORDER BY WO_NUM ASC
</cfquery>
<cfquery name="Techs" datasource="WORKORDER">
SELECT * FROM STAF
</cfquery>
<cfquery name="DetailType" datasource="WORKORDER">
SELECT LOOKUP2 FROM USERLOOKUP2 ORDER BY LOOKUP2 ASC
</cfquery>
<cfquery name="Priority" datasource="WORKORDER">
SELECT * FROM PRIORITY ORDER BY PRIORITY ASC
</cfquery>
<html>
<head>
<title>Tech Details/Update</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body leftmargin="5" topmargin="5">
<form action="<cfoutput>#CurrentPage#</cfoutput>" method="POST" name="techupdate" id="techupdate">
  <table width="692" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="78"><img src="stateseal_color_smTrans.gif" width="60" height="60"></td>
      <td width="350"><font size="+1" face="Arial, Helvetica, sans-serif">12th
        Judicial Circuit<br>
        <font size="+2">C</font>ourt <font size="+2">A</font>dministration <font size="+2">T</font>echnology
        <font size="+2">S</font>ervices</font></td>
      <td width="29" align="right" valign="top"><p>&nbsp;</p></td>
      <td width="217" align="right" valign="top"><div align="left"><font size="-2">Court
          Technology Officer - **********<br>
          Network Administrator - **********<br>
          Network Administrator - **********<br>
          Help Desk Support - **********<br>
          Network Administrator - **********</font></div></td>
    </tr>
  </table>
  <table width="692" border="0" align="center">
    <tr>
      <td width="784"><table width="692" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="707" align="center" valign="middle" bgcolor="#0000CC">
              <font color="#FFFFFF" size="+1" face="Arial, Helvetica, sans-serif">CATS
              Help Desk Technician Area</font></td>
          </tr>
        </table>
        <table width="692" border="0" cellpadding="0" cellspacing="0" bgcolor="#666666">
          <tr>
            <td width="393"><div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Requestor</font></div></td>
            <td width="295"><div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Task</font></div></td>
            <td width="10">&nbsp;</td>
          </tr>
        </table>
        <table width="695" height="223" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td> <table width="237" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="237"> <table width="389" height="223" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#000000">
                      <tr>
                        <td width="389"><table width="387" height="221" border="0" align="center" bgcolor="#CCCCCC" font size="-1">
                            <tr>
                              <td width="77"><font size="-1">Work Order:</font></td>
                              <td width="110"><input name="WO_Num" type="text" tabindex=-1 id="WO_Num2" value="<cfoutput>#Work_Order.WO_NUM#</cfoutput>" onFocus="this.blur()" size="2"></td>
                              <td width="46"><div align="right"><font size="-1">Serial
                                  :</font></div></td>
                              <td width="136"><input name="AWS_NUM" type="text" id="AWS_NUM3" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.AWS_NUM#</cfoutput>" size="12"></td>
                            </tr>
                            <tr>
                              <td><font size="-1">Requestor:</font></td>
                              <td colspan="3"><font size="-1">
                                <input name="REQUEST" type="text" id="REQUEST3" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.REQUEST#</cfoutput>" size="32">
                                </font></td>
                            </tr>
                            <tr>
                              <td><font size="-1">Phone:</font></td>
                              <td><input name="PHONE" type="text" id="PHONE3" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.PHONE#</cfoutput>" size="12"></td>
                              <td><div align="right"><font size="-1"> Ext:</font>
                                </div></td>
                              <td><input name="PHONE_EXT" type="text" id="PHONE_EXT3" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.PHONE_EXT#</cfoutput>" size="5"></td>
                            </tr>
                            <tr>
                              <td><font size="-1">E-mail:</font></td>
                              <td colspan="3"><font size="-1">
                                <input name="EMAILADDR" type="text" id="EMAILADDR3" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.EMAILADDR#</cfoutput>" size="32">
                                </font></td>
                            </tr>
                            <tr>
                              <td><font size="-1">Department:</font></td>
                              <td colspan="3"><font size="-1">
                                <input name="DEPT" type="text" id="DEPT3" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.DEPT#</cfoutput>" size="32">
                                </font></td>
                            </tr>
                            <tr>
                              <td><font size="-1">Location:</font></td>
                              <td colspan="3"><font size="-1">
                                <input name="LOCATION" type="text" tabindex=-1 id="location2" value="<cfoutput>#Work_Order.LOCATION#</cfoutput>" onFocus="this.blur()" size="32">
                                </font></td>
                            </tr>
                            <tr>
                              <td><font size="-1">Workstation:</font></td>
                              <td colspan="3"><font size="-1">
                                <input name="WS_NUM" type="text" id="WS_NUM3" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.WS_NUM#</cfoutput>" size="3">
                                <input name="updated" type="hidden" id="hiddenField3" value="Now()">
                                <input name="status" type="hidden" id="status" value="Pending">
                                </font></td>
                            </tr>
                            <tr>
                              <td colspan="4">&nbsp;</td>
                            </tr>
                          </table /font></td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
            <td width="298"> <table width="292" height="223" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="464" valign="middle" bgcolor="#000000"> <table width="290" height="207" border="0" align="center" bgcolor="#CCCCCC">
                      <tr>
                        <td width="288"><font size="-1">Summary:</font></td>
                      </tr>
                      <tr>
                        <td><input name="TASK" type="text" id="TASK" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.TASK#</cfoutput>" size="40"></td>
                      </tr>
                      <tr>
                        <td><font size="-1">Trouble Type: </font></td>
                      </tr>
                      <tr>
                        <td><input name="TYPE" type="text" id="TYPE" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.TYPE#</cfoutput>" size="40"></td>
                      </tr>
                      <tr>
                        <td><font size="-1">Detailed Description of Problem:</font></td>
                      </tr>
                      <tr>
                        <td> <font size="-1">
                          <textarea name="DESCRIPT" cols="32" rows="6" id="textarea" tabindex=-1 onFocus="this.blur()"><cfoutput>#Work_Order.DESCRIPT#</cfoutput></textarea>
                          </font> </td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
          </tr>
        </table></td>
    </tr>
  </table>
  <table width="692" border="0" align="center">
    <tr>
      <td width="784"> <table width="692" border="0" cellpadding="0" cellspacing="0" bgcolor="#666666">
          <tr>
            <td width="393"><div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Resolution</font></div></td>
            <td width="295">&nbsp;</td>
            <td width="10">&nbsp;</td>
          </tr>
        </table>
        <table width="695" height="223" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td> <table width="237" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="237"> <table width="389" height="223" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#000000">
                      <tr>
                        <td width="389"><table width="387" height="221" border="0" align="center" bgcolor="#CCCCCC" font size="-1">
                            <tr>
                              <td width="74"><font size="-1">Assigned to:</font></td>
                              <td width="303"> <select tabindex=6 name="TECH" id="TECH">
                                  <cfoutput query="Techs">
                                    <option value="#Techs.NAME#" <cfif (isDefined("Work_Order.RESPONS") AND Techs.NAME EQ Work_Order.RESPONS)>selected</cfif>>#Techs.NAME#</option>
                                  </cfoutput> </select></td>
                            </tr>
                            <tr>
                              <td><font size="-1">Priority:</font></td>
                              <td><font size="-1">
                                <select tabindex=7 name="PRIORITY" id="PRIORITY">
                                  <cfoutput query="Priority">
                                    <option value="#Priority.PRIORITY#" <cfif (isDefined("Work_Order.PRIORITY") AND Priority.PRIORITY EQ Work_Order.PRIORITY)>selected</cfif>>#Priority.PRIORITY#</option>
                                  </cfoutput>
                                </select>
                                </font></td>
                            </tr>
                            <tr>
                              <td><font size="-1">Detail Type:</font></td>
                              <td> <select tabindex=8 name="DETAIL" id="DETAIL">
                                  <cfoutput query="DetailType">
                                    <option value="#DetailType.LOOKUP2#">#DetailType.LOOKUP2#</option>
                                  </cfoutput> </select> <font size="-1">
                                <input name="status2" type="hidden" id="status22" value="Pending">
                                </font> </td>
                            </tr>
                            <tr>
                              <td colspan="2"> <div align="left"><font size="-1">Resolution:</font></div></td>
                            </tr>
                            <tr>
                              <td colspan="2"><font size="-1">
                                <textarea name="NOTE" cols="43" rows="6" id="NOTE" tabindex=1>
</textarea>
                                </font></td>
                            </tr>
                          </table /font></td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
            <td width="298"> <table width="292" height="223" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="464" valign="middle" bgcolor="#000000"> <table width="290" height="221" border="0" align="center" bgcolor="#CCCCCC">
                      <tr>
                        <td width="94"><font size="-1">Assign Date:</font></td>
                        <td width="186"><input name="ASSNDATE" type="text" id="ASSNDATE" tabindex=2 value="<cfoutput>#LSDateFormat(Work_Order.ASSNDATE,'M/DD/YY')#</cfoutput>" size=20>
                          <small><a href="javascript:showCal('Calendar1')" tabindex=-1><img src="date.gif" width="19" height="17" border="0"></a></small>
                        </td>
                      </tr>
                      <tr>
                        <td><font size="-1">Due Date:</font> </td>
                        <td><input name="DUEDATE" type="text" id="DUEDATE" tabindex=3 value="<cfoutput>#LSDateFormat(Work_Order.DUEDATE,'M/DD/YY')#</cfoutput>" size=20>
                          <small><a href="javascript:showCal('Calendar2')" tabindex=-1><img src="date.gif" width="19" height="17" border="0"></a></small>
                        </td>
                      </tr>
                      <tr>
                        <td><font size="-1">Completed Date: </font></td>
                        <td><input name="COMPDATE" type="text" id="COMPDATE" tabindex=4 value="<cfoutput>#LSDateFormat(Work_Order.COMPLETED,'M/DD/YY')#</cfoutput>" size=20>
                          <small><a href="javascript:showCal('Calendar3')" tabindex=-1><img src="date.gif" width="19" height="17" border="0"></a></small></td>
                      </tr>
                      <tr>
                        <td><font size="-1">Hours Invested:</font></td>
                        <td><input name="HOURS" type="text" id="HOURS" tabindex=5 value="<cfoutput>#Work_Order.HOURS#</cfoutput>" size="6"></td>
                      </tr>
                      <tr>
                        <td colspan="2">&nbsp;</td>
                      </tr>
                      <tr>
                        <td colspan="2"> </td>
                      </tr>
                      <tr>
                        <td colspan="2"><font size="-1">Work_Order.Lookup2 =</font>
                          <cfoutput>#Work_Order.LOOKUP2#</cfoutput></td>
                      </tr>
                      <tr>
                        <td colspan="2">&nbsp;</td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
          </tr>
        </table></td>
    </tr>
  </table>
  <div align="center">
    <input type="submit" name="Submit" value="Submit">
    <input type="reset" name="Submit2" value="Reset">
    <br>
    <input type="hidden" name="MM_UpdateRecord" value="techupdate">
  </div>
</form>
<p>&nbsp;</p>
<script>
var mydate=new Date()
var theyear=mydate.getYear()
if (theyear < 1000)
theyear+=1900
var theday=mydate.getDay()
var themonth=mydate.getMonth()+1
if (themonth<10)
themonth="0"+themonth
var theday=mydate.getDate()
if (theday<10)
theday="0"+theday

//////EDIT below three variable to customize the format of the date/////

var displayfirst=themonth
var displaysecond=theday
var displaythird=theyear
//document.techupdate.DUEDATE.value=displayfirst+"/"+displaysecond+"/"+displaythird//

</script>
<script language="JavaScript"><!--
document.techupdate.RESOL.focus();
//--></script>

</body>
</html>
 
ASKER CERTIFIED SOLUTION
Avatar of HamdyHassan
HamdyHassan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
"I have tried setting Note='HELLO' and Note=NULL without any luck."

that means the problem is not your script, the problem of data source driver that have problem updating memo field.

Ok, tried all of the suggestions. Date fields are Text. I have corrected so that dates are now entered like :#createodbcdate(compdate)#. NOTE is a Memo field and defined as textarea. I have tried setting Note='HELLO' and Note=NULL without any luck. Once again, I comment out the NOTE= and it works fine. I will past the entire html here to see if that helps.

<script language="javascript" src="cal3.js"></script>
<script language="javascript" src="cal_conf3.js"></script>
<cfparam name="URL.recordID" default="1">
<cfset CurrentPage=GetFileFromPath(GetTemplatePath())>
<cfif IsDefined("FORM.MM_UpdateRecord") AND FORM.MM_UpdateRecord EQ "techupdate">
  <cfquery datasource="WORKORDER">
  UPDATE TASKS SET TASK=
  <cfif IsDefined("FORM.TASK") AND #FORM.TASK# NEQ "">
    '#FORM.TASK#'
    <cfelse>
    NULL
  </cfif>
  , TYPE=
  <cfif IsDefined("FORM.TYPE") AND #FORM.TYPE# NEQ "">
    '#FORM.TYPE#'
    <cfelse>
    NULL
  </cfif>
  , REQUEST=
  <cfif IsDefined("FORM.REQUEST") AND #FORM.REQUEST# NEQ "">
    '#FORM.REQUEST#'
    <cfelse>
    NULL
  </cfif>
  , CLSDDATE=
  <cfif IsDefined("FORM.COMPDATE") AND #FORM.COMPDATE# NEQ "">
     #createodbcdate(compdate)#  
    <cfelse>
    NULL
  </cfif>
  , PRIORITY=
  <cfif IsDefined("FORM.PRIORITY") AND #FORM.PRIORITY# NEQ "">
    '#FORM.PRIORITY#'
    <cfelse>
    NULL
  </cfif>
  , DUEDATE=
  <cfif IsDefined("FORM.DUEDATE") AND #FORM.DUEDATE# NEQ "">
    #createodbcdate(duedate)#  
    <cfelse>
    NULL
  </cfif>
  , RESPONS=
  <cfif IsDefined("FORM.TECH") AND #FORM.TECH# NEQ "">
    '#FORM.TECH#'
    <cfelse>
    NULL
  </cfif>
  , ASSNDATE=
  <cfif IsDefined("FORM.ASSNDATE") AND #FORM.ASSNDATE# NEQ "">
    '#FORM.ASSNDATE#'
    <cfelse>
    NULL
  </cfif>
  , COMPLETED=
  <cfif IsDefined("FORM.COMPDATE") AND #FORM.COMPDATE# NEQ "">
    #createodbcdate(compdate)#
    <cfelse>
    NULL
  </cfif>
  , HOURS=
  <cfif IsDefined("FORM.HOURS") AND #FORM.HOURS# NEQ "">
    #FORM.HOURS#
    <cfelse>
    NULL
  </cfif>
  , WS_NUM=
  <cfif IsDefined("FORM.WS_NUM") AND #FORM.WS_NUM# NEQ "">
    #FORM.WS_NUM#
    <cfelse>
    NULL
  </cfif>
  , DEPT=
  <cfif IsDefined("FORM.DEPT") AND #FORM.DEPT# NEQ "">
    '#FORM.DEPT#'
    <cfelse>
    NULL
  </cfif>
  , PHONE=
  <cfif IsDefined("FORM.PHONE") AND #FORM.PHONE# NEQ "">
    '#FORM.PHONE#'
    <cfelse>
    NULL
  </cfif>
  , PHONE_EXT=
  <cfif IsDefined("FORM.PHONE_EXT") AND #FORM.PHONE_EXT# NEQ "">
    '#FORM.PHONE_EXT#'
    <cfelse>
    NULL
  </cfif>
  , LOCATION=
  <cfif IsDefined("FORM.LOCATION") AND #FORM.LOCATION# NEQ "">
    '#FORM.LOCATION#'
    <cfelse>
    NULL
  </cfif>
  , DESCRIPT=
  <cfif IsDefined("FORM.DESCRIPT") AND #FORM.DESCRIPT# NEQ "">
    '#FORM.DESCRIPT#'
    <cfelse>
    NULL
  </cfif>
  , NOTE=
  <cfif IsDefined("FORM.NOTE") AND #FORM.NOTE# NEQ "">
    '#FORM.NOTE#'
    <cfelse>
    NULL
  </cfif>--->
  , AWS_NUM=
  <cfif IsDefined("FORM.AWS_NUM") AND #FORM.AWS_NUM# NEQ "">
    '#FORM.AWS_NUM#'
    <cfelse>
    NULL
  </cfif>
  , LOOKUP2=
  <cfif IsDefined("FORM.DETAIL") AND #FORM.DETAIL# NEQ "">
    '#FORM.DETAIL#'
    <cfelse>
    NULL
  </cfif>
  , EMAILADDR=
  <cfif IsDefined("FORM.EMAILADDR") AND #FORM.EMAILADDR# NEQ "">
    '#FORM.EMAILADDR#'
    <cfelse>
    NULL
  </cfif>
  WHERE WO_NUM=#FORM.WO_Num#
  </cfquery>
  <cflocation url="tech.cfm">
</cfif>
<cfquery name="Work_Order" datasource="WORKORDER">
SELECT * FROM TASKS WHERE WO_NUM = #URL.recordID# ORDER BY WO_NUM ASC
</cfquery>
<cfquery name="Techs" datasource="WORKORDER">
SELECT * FROM STAF
</cfquery>
<cfquery name="DetailType" datasource="WORKORDER">
SELECT LOOKUP2 FROM USERLOOKUP2 ORDER BY LOOKUP2 ASC
</cfquery>
<cfquery name="Priority" datasource="WORKORDER">
SELECT * FROM PRIORITY ORDER BY PRIORITY ASC
</cfquery>
<html>
<head>
<title>Tech Details/Update</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body leftmargin="5" topmargin="5">
<form action="<cfoutput>#CurrentPage#</cfoutput>" method="POST" name="techupdate" id="techupdate">
  <table width="692" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="78"><img src="stateseal_color_smTrans.gif" width="60" height="60"></td>
      <td width="350"><font size="+1" face="Arial, Helvetica, sans-serif">12th
        Judicial Circuit<br>
        <font size="+2">C</font>ourt <font size="+2">A</font>dministration <font size="+2">T</font>echnology
        <font size="+2">S</font>ervices</font></td>
      <td width="29" align="right" valign="top"><p>&nbsp;</p></td>
      <td width="217" align="right" valign="top"><div align="left"><font size="-2">Court
          Technology Officer - **********<br>
          Network Administrator - **********<br>
          Network Administrator - **********<br>
          Help Desk Support - **********<br>
          Network Administrator - **********</font></div></td>
    </tr>
  </table>
  <table width="692" border="0" align="center">
    <tr>
      <td width="784"><table width="692" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="707" align="center" valign="middle" bgcolor="#0000CC">
              <font color="#FFFFFF" size="+1" face="Arial, Helvetica, sans-serif">CATS
              Help Desk Technician Area</font></td>
          </tr>
        </table>
        <table width="692" border="0" cellpadding="0" cellspacing="0" bgcolor="#666666">
          <tr>
            <td width="393"><div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Requestor</font></div></td>
            <td width="295"><div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Task</font></div></td>
            <td width="10">&nbsp;</td>
          </tr>
        </table>
        <table width="695" height="223" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td> <table width="237" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="237"> <table width="389" height="223" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#000000">
                      <tr>
                        <td width="389"><table width="387" height="221" border="0" align="center" bgcolor="#CCCCCC" font size="-1">
                            <tr>
                              <td width="77"><font size="-1">Work Order:</font></td>
                              <td width="110"><input name="WO_Num" type="text" tabindex=-1 id="WO_Num2" value="<cfoutput>#Work_Order.WO_NUM#</cfoutput>" onFocus="this.blur()" size="2"></td>
                              <td width="46"><div align="right"><font size="-1">Serial
                                  :</font></div></td>
                              <td width="136"><input name="AWS_NUM" type="text" id="AWS_NUM3" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.AWS_NUM#</cfoutput>" size="12"></td>
                            </tr>
                            <tr>
                              <td><font size="-1">Requestor:</font></td>
                              <td colspan="3"><font size="-1">
                                <input name="REQUEST" type="text" id="REQUEST3" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.REQUEST#</cfoutput>" size="32">
                                </font></td>
                            </tr>
                            <tr>
                              <td><font size="-1">Phone:</font></td>
                              <td><input name="PHONE" type="text" id="PHONE3" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.PHONE#</cfoutput>" size="12"></td>
                              <td><div align="right"><font size="-1"> Ext:</font>
                                </div></td>
                              <td><input name="PHONE_EXT" type="text" id="PHONE_EXT3" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.PHONE_EXT#</cfoutput>" size="5"></td>
                            </tr>
                            <tr>
                              <td><font size="-1">E-mail:</font></td>
                              <td colspan="3"><font size="-1">
                                <input name="EMAILADDR" type="text" id="EMAILADDR3" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.EMAILADDR#</cfoutput>" size="32">
                                </font></td>
                            </tr>
                            <tr>
                              <td><font size="-1">Department:</font></td>
                              <td colspan="3"><font size="-1">
                                <input name="DEPT" type="text" id="DEPT3" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.DEPT#</cfoutput>" size="32">
                                </font></td>
                            </tr>
                            <tr>
                              <td><font size="-1">Location:</font></td>
                              <td colspan="3"><font size="-1">
                                <input name="LOCATION" type="text" tabindex=-1 id="location2" value="<cfoutput>#Work_Order.LOCATION#</cfoutput>" onFocus="this.blur()" size="32">
                                </font></td>
                            </tr>
                            <tr>
                              <td><font size="-1">Workstation:</font></td>
                              <td colspan="3"><font size="-1">
                                <input name="WS_NUM" type="text" id="WS_NUM3" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.WS_NUM#</cfoutput>" size="3">
                                <input name="updated" type="hidden" id="hiddenField3" value="Now()">
                                <input name="status" type="hidden" id="status" value="Pending">
                                </font></td>
                            </tr>
                            <tr>
                              <td colspan="4">&nbsp;</td>
                            </tr>
                          </table /font></td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
            <td width="298"> <table width="292" height="223" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="464" valign="middle" bgcolor="#000000"> <table width="290" height="207" border="0" align="center" bgcolor="#CCCCCC">
                      <tr>
                        <td width="288"><font size="-1">Summary:</font></td>
                      </tr>
                      <tr>
                        <td><input name="TASK" type="text" id="TASK" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.TASK#</cfoutput>" size="40"></td>
                      </tr>
                      <tr>
                        <td><font size="-1">Trouble Type: </font></td>
                      </tr>
                      <tr>
                        <td><input name="TYPE" type="text" id="TYPE" tabindex=-1 onFocus="this.blur()" value="<cfoutput>#Work_Order.TYPE#</cfoutput>" size="40"></td>
                      </tr>
                      <tr>
                        <td><font size="-1">Detailed Description of Problem:</font></td>
                      </tr>
                      <tr>
                        <td> <font size="-1">
                          <textarea name="DESCRIPT" cols="32" rows="6" id="textarea" tabindex=-1 onFocus="this.blur()"><cfoutput>#Work_Order.DESCRIPT#</cfoutput></textarea>
                          </font> </td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
          </tr>
        </table></td>
    </tr>
  </table>
  <table width="692" border="0" align="center">
    <tr>
      <td width="784"> <table width="692" border="0" cellpadding="0" cellspacing="0" bgcolor="#666666">
          <tr>
            <td width="393"><div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Resolution</font></div></td>
            <td width="295">&nbsp;</td>
            <td width="10">&nbsp;</td>
          </tr>
        </table>
        <table width="695" height="223" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td> <table width="237" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="237"> <table width="389" height="223" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#000000">
                      <tr>
                        <td width="389"><table width="387" height="221" border="0" align="center" bgcolor="#CCCCCC" font size="-1">
                            <tr>
                              <td width="74"><font size="-1">Assigned to:</font></td>
                              <td width="303"> <select tabindex=6 name="TECH" id="TECH">
                                  <cfoutput query="Techs">
                                    <option value="#Techs.NAME#" <cfif (isDefined("Work_Order.RESPONS") AND Techs.NAME EQ Work_Order.RESPONS)>selected</cfif>>#Techs.NAME#</option>
                                  </cfoutput> </select></td>
                            </tr>
                            <tr>
                              <td><font size="-1">Priority:</font></td>
                              <td><font size="-1">
                                <select tabindex=7 name="PRIORITY" id="PRIORITY">
                                  <cfoutput query="Priority">
                                    <option value="#Priority.PRIORITY#" <cfif (isDefined("Work_Order.PRIORITY") AND Priority.PRIORITY EQ Work_Order.PRIORITY)>selected</cfif>>#Priority.PRIORITY#</option>
                                  </cfoutput>
                                </select>
                                </font></td>
                            </tr>
                            <tr>
                              <td><font size="-1">Detail Type:</font></td>
                              <td> <select tabindex=8 name="DETAIL" id="DETAIL">
                                  <cfoutput query="DetailType">
                                    <option value="#DetailType.LOOKUP2#">#DetailType.LOOKUP2#</option>
                                  </cfoutput> </select> <font size="-1">
                                <input name="status2" type="hidden" id="status22" value="Pending">
                                </font> </td>
                            </tr>
                            <tr>
                              <td colspan="2"> <div align="left"><font size="-1">Resolution:</font></div></td>
                            </tr>
                            <tr>
                              <td colspan="2"><font size="-1">
                                <textarea name="NOTE" cols="43" rows="6" id="NOTE" tabindex=1>
</textarea>
                                </font></td>
                            </tr>
                          </table /font></td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
            <td width="298"> <table width="292" height="223" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="464" valign="middle" bgcolor="#000000"> <table width="290" height="221" border="0" align="center" bgcolor="#CCCCCC">
                      <tr>
                        <td width="94"><font size="-1">Assign Date:</font></td>
                        <td width="186"><input name="ASSNDATE" type="text" id="ASSNDATE" tabindex=2 value="<cfoutput>#LSDateFormat(Work_Order.ASSNDATE,'M/DD/YY')#</cfoutput>" size=20>
                          <small><a href="javascript:showCal('Calendar1')" tabindex=-1><img src="date.gif" width="19" height="17" border="0"></a></small>
                        </td>
                      </tr>
                      <tr>
                        <td><font size="-1">Due Date:</font> </td>
                        <td><input name="DUEDATE" type="text" id="DUEDATE" tabindex=3 value="<cfoutput>#LSDateFormat(Work_Order.DUEDATE,'M/DD/YY')#</cfoutput>" size=20>
                          <small><a href="javascript:showCal('Calendar2')" tabindex=-1><img src="date.gif" width="19" height="17" border="0"></a></small>
                        </td>
                      </tr>
                      <tr>
                        <td><font size="-1">Completed Date: </font></td>
                        <td><input name="COMPDATE" type="text" id="COMPDATE" tabindex=4 value="<cfoutput>#LSDateFormat(Work_Order.COMPLETED,'M/DD/YY')#</cfoutput>" size=20>
                          <small><a href="javascript:showCal('Calendar3')" tabindex=-1><img src="date.gif" width="19" height="17" border="0"></a></small></td>
                      </tr>
                      <tr>
                        <td><font size="-1">Hours Invested:</font></td>
                        <td><input name="HOURS" type="text" id="HOURS" tabindex=5 value="<cfoutput>#Work_Order.HOURS#</cfoutput>" size="6"></td>
                      </tr>
                      <tr>
                        <td colspan="2">&nbsp;</td>
                      </tr>
                      <tr>
                        <td colspan="2"> </td>
                      </tr>
                      <tr>
                        <td colspan="2"><font size="-1">Work_Order.Lookup2 =</font>
                          <cfoutput>#Work_Order.LOOKUP2#</cfoutput></td>
                      </tr>
                      <tr>
                        <td colspan="2">&nbsp;</td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
          </tr>
        </table></td>
    </tr>
  </table>
  <div align="center">
    <input type="submit" name="Submit" value="Submit">
    <input type="reset" name="Submit2" value="Reset">
    <br>
    <input type="hidden" name="MM_UpdateRecord" value="techupdate">
  </div>
</form>
<p>&nbsp;</p>
<script>
var mydate=new Date()
var theyear=mydate.getYear()
if (theyear < 1000)
theyear+=1900
var theday=mydate.getDay()
var themonth=mydate.getMonth()+1
if (themonth<10)
themonth="0"+themonth
var theday=mydate.getDate()
if (theday<10)
theday="0"+theday

//////EDIT below three variable to customize the format of the date/////

var displayfirst=themonth
var displaysecond=theday
var displaythird=theyear
//document.techupdate.DUEDATE.value=displayfirst+"/"+displaysecond+"/"+displaythird//

</script>
<script language="JavaScript"><!--
document.techupdate.RESOL.focus();
//--></script>

</body>
</html>
 
hi y is that ur posting the comment so many times ???

ne-ways ... what u cld do for textarea field types is send them in query as foll:

#preservesinglequotes(form.textarea_fieldName)#

that shld take care of it

let me know

K'Rgds
Anand
I have only posted that comment once. I do not know why it keeps reposting... I will try your suggestion and get back with you. Thanks.
Well, I believe I have figured out the problem. It appears that NOTE is a reserved word. I have not any documentation to confirm this as of yet, but when I change my db field to anything else it appears to work. The only problem is that this db is associated with a Windows Application that looks for that NOTE field... I thank you all for your help. If someone can figure out a way for me to submit it to one field and have it transfered over to the NOTE field somehow automatically else I can still reward these points.
"NOTE is a reserved word" what a surprise!

Now what is the new question?
what do you mean by
"a way for me to submit it to one field and have it transfered over to the NOTE field somehow automatically"
yeah - even i didnt get the new question ?

if its a reserve word - it is a reserver word & u cannot use it - so all u need to do is rename it & move on - rather than bother manipulating thigns somehow ...

u may succeed at it - but whats the gurantee - it wont get stuck in future when u need some modification

K'Rgds
Anand
I was able to get it to go by placing the word NOTE in quotation marks as "NOTE". I am going to ask that these points be split (75) for HamdyHassan and (25) for anandkp. I want to thank you for all your help.
MGostischa

You asked to split points between
I have reduced the points on this question from 100 to 75 as indicated by your request at Community Support. Please copy the URL and create a new question in this topic area for the other Experts to whom you wish to award points. The title of the question should read "Points for", followed by the Expert's name. In the question itself, you should paste the link to the original question and perhaps a comment stating that the points are for their help with that question. Once you have created the new questions, you can go back to the original, and accept the comment from the Expert for whom you did not create a new question. The Experts will  comment in your new "Points for" question(s), which you then accept and grade to close.
If you have any questions, please don't hesitate to ask.
Thank you.

** Mindphaser - Community Support Moderator **
hi - its ok - i dont wish to get the 25 points

u can award them all to hamdyhassan

I am very much ok with it :)

Cheers
Anand
Thanks for all your help.