Still Recieving the error


Error Occurred While Processing Request

Error Executing Database Query.

[Macromedia][Oracle JDBC Driver][Oracle]ORA-01843: not a valid month

The error occurred in C:\Inetpub\wwwroot\CFIDE\PollPopup.cfm: line 130

128 : '#DNAME#',
129 : '#ENAME#',
130 : '#ARCHIVE#' )
131 :      </cfquery>
132 :
________________________________

SQL     INSERT INTO POLL (POLL_ID, AUTHOR, STARTDATE, ENDDATE,
ACTIVE, POLLTYPE, QUESTION, ANAME, BNAME, CNAME, DNAME, ENAME, ARCHIVE )
VALUES ('england04', '121.100.25.2', '06-15-2004', '06-25-2004', 'yes',
'Y', 'Will this poll work ?', '', '', '', '', '', 'NO' )
DATASOURCE    poll
VENDORERRORCODE    1843
SQLSTATE    HY000
Please try the following:


These are the only date lines being used on the pollpopup.cfm page, what
could be causing the above date error on MX ??


<cfparam default="poll" name="dbsource">
<cfparam default="POLL" name="tablename">


<cfset formatted_date = dateformat(Now(), "MM-DD-YYYY")>


<!-- These variables you probably shouldnt touch -->
<cfparam default="" name="id">
<cfparam default="" name="actions">


<html>
<head>
<title>Admin Add/Edit/Delete</title>


<script language="_javascript_">
function popup(url) {


window.open(url,'EditWindow','toolbar=yes,location=no,directories=no,sta
tus=no,menubar=no,scrollbars=yes,resizable=yes,width=530,height=450');
  }
  
function getanswer(url) {
  if (confirm("Are you sure you want to delete this item?"))
  self.location=url;
  }
</script>  


</head>


<cfif id neq ''>           
<cfquery datasource="#dbsource#" name="editinfo">
SELECT *
FROM #tablename#
where poll_ID = '#id#'
</cfquery>
</cfif>

<cfswitch _expression_="#actions#">
<cfcase value="delete">
  <cfquery datasource="#dbsource#" name="">
  DELETE
  FROM #tablename#
  WHERE poll_id = '#id#'  
  </cfquery>
  <body >   <font face="helvetica, arial" color="red">
  <br><br><br><div align="center">
  Deletion Successful.
  </font>
  <form><input type="button" value="Close Window"
window.opener.focus();"></form>
  </body>
  <cfabort>
  
</cfcase>
<cfcase value="add">
  <cfif isDate(startdate) AND isDate(enddate)>
   <cfset form.poll_id = listchangedelims(form.poll_id, "", " ")>
   <!---<cfinsert datasource="#dbsource#" tablename="#tablename#"


formfields="POLL_ID,STARTDATE,ENDDATE,ACTIVE,POLLTYPE,QUESTION,ANAME,BNA
ME,
   CNAME,DNAME,ENAME, AUTHOR, ARCHIVE">--->
  


   <cfset formatted_date1 = dateformat(startdate, "MM-DD-YYYY")>
<cfset formatted_date2 = dateformat(enddate, "MM-DD-YYYY")>

   
   <cfquery datasource="#dbsource#">
   
   INSERT INTO #tablename#
   (POLL_ID,
   AUTHOR,
   STARTDATE,
   ENDDATE,
   ACTIVE,
   POLLTYPE,
   QUESTION,
   ANAME,
   BNAME,
   CNAME,
   DNAME,
   ENAME,
   ARCHIVE )
   
   VALUES
   ('#poll_id#',
   '#author#',
   '#formatted_date1#',
   '#formatted_date2#',
   '#ACTIVE#',
   '#POLLTYPE#',
   '#QUESTION#',
   '#ANAME#',
   '#BNAME#',
   '#CNAME#',
   '#DNAME#',
   '#ENAME#',
   '#ARCHIVE#' )
       </cfquery>
   
   <body >    <font face="helvetica, arial" color="red">
   <br><br><br><div align="center">
   Addition Successful.
   </font>
   <form><input type="button" value="Close Window"
window.opener.focus();"></form>
   </body>
  <cfelse>
   <body>
   <font face="helvetica, arial" color="red">
   <br><br><br><div align="center">
   You've entered an invalid Start or End date.<br>
   Hit your back button to re-edit and don't do it again!!!.
   </font>
   </body>
  </cfif>
  <cfabort>
</cfcase>
<cfcase value="edit">


  <cfif isDate(startdate) AND isDate(enddate)>
  
   <cfset formatted_date1 = dateformat(startdate, "MM-DD-YYYY")>
<cfset formatted_date2 = dateformat(enddate, "MM-DD-YYYY")>


   <cfquery datasource="#dbsource#">
    Update #tablename#
    SET STARTDATE=TO_DATE('#startdate#', 'MM-DD-YYYY'),
    enddate=TO_DATE('#enddate#', 'MM-DD-YYYY'),
    ACTIVE='#ACTIVE#',
    POLLTYPE='#POLLTYPE#',
    QUESTION='#QUESTION#',
    ANAME='#ANAME#',
    BNAME='#BNAME#',
    CNAME='#CNAME#',
    DNAME='#DNAME#',
    ENAME='#ENAME#',
    ARCHIVE='#ARCHIVE#'   
    WHERE Poll_ID = '#poll_id#'
   </cfquery>  
   <body >    <font face="helvetica, arial" color="red">
   <br><br><br><div align="center">
   Update Successful.
   </font>
   <form><input type="button" value="Close Window"
window.opener.focus();"></form>
   </body>
  <cfelse>
   <body>
   <font face="helvetica, arial" color="red">
   <br><br><br><div align="center">
   You've entered an invalid Start or End date.<br>
   Hit your back button to re-edit.   
   </font>
   </body>
  </cfif>
  <cfabort>
</cfcase>
<cfdefaultcase></cfdefaultcase>


</cfswitch>

________________________________

From: Pascal Peters [mailto:[EMAIL PROTECTED]
Sent: 15 June 2004 17:19
To: CF-Talk
Subject: RE: CF Dates with MX 6.1 ?

Use that format in conjunction with TO_DATE()

> -----Original Message-----
> From: Ian Vaughan [mailto:[EMAIL PROTECTED]
> Sent: dinsdag 15 juni 2004 17:40
> To: CF-Talk
> Subject: RE: CF Dates with MX 6.1 ?
>
> Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166692
> ---
> mm/dd/yyyy
>
> ________________________________
>
> From: Pascal Peters [mailto:[EMAIL PROTECTED]
> Sent: 15 June 2004 16:27
> To: CF-Talk
> Subject: RE: CF Dates with MX 6.1 ?
>
>
> Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166688
> ---
> What format is startdate in ?????
>
> > -----Original Message-----
> > From: Ian Vaughan [mailto:[EMAIL PROTECTED]
> > Sent: dinsdag 15 juni 2004 15:59
> > To: CF-Talk
> > Subject: RE: CF Dates with MX 6.1 ?
> >
> > Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166670
> > ---
> > Doug
> >  
> > How would I change the following two lines to make it
> > compatible with mx 6.1? Because it does not like the
> > createodbcdate ???
> >  
> >  <cfset formatted_date1 = dateformat(createodbcdate(startdate),
> > "MM-DD-YYYY")>
> >  <cfset formatted_date2 = dateformat(createodbcdate(enddate),
> > "MM-DD-YYYY")>
> >
>
________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to