RE: cf mx and oracle 8i

2004-07-20 Thread Micha Schopman
Try using createODBCDateTime() to specify a dateobject, instead of to_date()

 
Micha Schopman 
Software Engineer 
Modern Media, Databankweg 12 M, 3821 AL  Amersfoort 
Tel 033-4535377, Fax 033-4535388 
KvK Amersfoort 39081679, Rabo 39.48.05.380
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: cf mx and oracle 8i

2004-07-20 Thread Simon Whittaker
On Tue, 20 Jul 2004 09:51:37 +0200, Steff <[EMAIL PROTECTED]> wrote:
> Hello
> 
> I have a request like
> insert into toolbox
> (idtoolbox,label,descr,language,idlinktype,idsource,creatingdate,updatingdat
> e,publish,delstatus,orderby) values (2,'services et
> catégories','','FR',0,0,to_date('2004-07-19 00:00:00.0',
> 'dd/mm/'),to_date('2004-07-19 00:00:00.0', 'dd/mm/'),1,0,)
> 

> I obtain this error
> 
> Error Executing Database Query.
> [Macromedia][Oracle JDBC Driver][Oracle]ORA-01861: literal does not match
> format string



I may be wrong but try taking out the time string from the date and
also ensuring that the format of the date matches ie:

to_date('19/07/2004', 'dd/mm/')

HTH

Simon
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: cf mx and oracle 8i

2004-07-20 Thread Steff
I try and I obtain ORA-00932: inconsistent datatypes
Can you help me?
thanks
steff
  -Message d'origine-
  De : Micha Schopman [mailto:[EMAIL PROTECTED]
  Envoyé : Tuesday, July 20, 2004 10:06 AM
  À : CF-Talk
  Objet : RE: cf mx and oracle 8i

  Try using createODBCDateTime() to specify a dateobject, instead of
to_date()

  Micha Schopman
  Software Engineer
  Modern Media, Databankweg 12 M, 3821 AL  Amersfoort
  Tel 033-4535377, Fax 033-4535388
  KvK Amersfoort 39081679, Rabo 39.48.05.380
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: cf mx and oracle 8i

2004-07-20 Thread Simon Whittaker
Steff,

You need to use to_date as this is used by Oracle to convert your date
from a string into the correct format. Have you tried the re-ordering
I suggested?

to_date('19/07/2004', 'dd/mm/')

Cheers

Simon

On Tue, 20 Jul 2004 10:20:05 +0200, Steff <[EMAIL PROTECTED]> wrote:
> I try and I obtain ORA-00932: inconsistent datatypes
> Can you help me?
> thanks
> steff
>   -Message d'origine-
>   De : Micha Schopman [mailto:[EMAIL PROTECTED]
>   Envoyé : Tuesday, July 20, 2004 10:06 AM
>   À : CF-Talk
>   Objet : RE: cf mx and oracle 8i
> 
> 
>   Try using createODBCDateTime() to specify a dateobject, instead of
> to_date()
> 
>   Micha Schopman
>   Software Engineer
>   Modern Media, Databankweg 12 M, 3821 AL  Amersfoort
>   Tel 033-4535377, Fax 033-4535388
>   KvK Amersfoort 39081679, Rabo 39.48.05.380
> 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: cf mx and oracle 8i

2004-07-20 Thread Micha Schopman
We need more info from you, we can only guess at the moment

 
- Is the datetime value you are inserting between the boundaries of the datetime type you have set with Oracle? (small datetime, large datetime, etc)
-  On which column does the error occur (take away cols, add cols, to your command)
-  What happens when you use createODBCDate()
-  What happens if you insert NULL values
-  Does the error occur on the datetime part? 

 
Etc..

 
Micha Schopman 
Software Engineer 
Modern Media, Databankweg 12 M, 3821 AL  Amersfoort 
Tel 033-4535377, Fax 033-4535388 
KvK Amersfoort 39081679, Rabo 39.48.05.380
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: cf mx and oracle 8i

2004-07-20 Thread Steff
I think where is the problem, I get date values with a query. The table
value  is like 19-JUL-04. Coldfusion gives me a date like '2004-07-19
00:00:00.0' to_date can't convert. So I should certainly before insert
query, modify the date to obtain the right format.

thanks
steff

-Message d'origine-
De : Micha Schopman [mailto:[EMAIL PROTECTED]
Envoyé : Tuesday, July 20, 2004 10:24 AM
À : CF-Talk
Objet : RE: cf mx and oracle 8i

  We need more info from you, we can only guess at the moment

  - Is the datetime value you are inserting between the boundaries of
the datetime type you have set with Oracle? (small datetime, large datetime,
etc)
  -  On which column does the error occur (take away cols, add cols,
to your command)
  -  What happens when you use createODBCDate()
  -  What happens if you insert NULL values
  -  Does the error occur on the datetime part?

  Etc..

  Micha Schopman
  Software Engineer
  Modern Media, Databankweg 12 M, 3821 AL  Amersfoort
  Tel 033-4535377, Fax 033-4535388
  KvK Amersfoort 39081679, Rabo 39.48.05.380
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: cf mx and oracle 8i

2004-07-20 Thread Simon Whittaker
On Tue, 20 Jul 2004 10:32:35 +0200, Steff <[EMAIL PROTECTED]> wrote:
> I think where is the problem, I get date values with a query. The table
> value  is like 19-JUL-04. Coldfusion gives me a date like '2004-07-19
> 00:00:00.0' to_date can't convert. So I should certainly before insert
> query, modify the date to obtain the right format.

That is right - try something like the following:

to_date('#dateformat(date_from_query,"DD/MM/")#','DD/MM/')

Should work okay for you

Cheers

Simon
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: cf mx and oracle 8i

2004-07-20 Thread Micha Schopman
Well you can create a new date object using CreateDateTime, CreateODBCDateTime, after stripping out the wanted values with Left, Right and Mid.

 
So for DD-MM- you could do

 



 
Micha Schopman 
Software Engineer 
Modern Media, Databankweg 12 M, 3821 AL  Amersfoort 
Tel 033-4535377, Fax 033-4535388 
KvK Amersfoort 39081679, Rabo 39.48.05.380
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: cf mx and oracle 8i

2004-07-20 Thread Jochem van Dieten
Steff wrote:
> 
> insert into toolbox
> (idtoolbox,label,descr,language,idlinktype,idsource,creatingdate,updatingdat
> e,publish,delstatus,orderby) values (2,'services et
> cat�gories','','FR',0,0,to_date('2004-07-19 00:00:00.0',
> 'dd/mm/'),to_date('2004-07-19 00:00:00.0', 'dd/mm/'),1,0,)

Use cfqueryparam.

Jochem
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: cf mx and oracle 8i

2004-07-20 Thread Steff
Thanks, it works well.

cordialy
Steff
  -Message d'origine-
  De : Simon Whittaker [mailto:[EMAIL PROTECTED]
  Envoyé : Tuesday, July 20, 2004 10:37 AM
  À : CF-Talk
  Objet : Re: cf mx and oracle 8i

  On Tue, 20 Jul 2004 10:32:35 +0200, Steff <[EMAIL PROTECTED]> wrote:
  > I think where is the problem, I get date values with a query. The table
  > value  is like 19-JUL-04. Coldfusion gives me a date like '2004-07-19
  > 00:00:00.0' to_date can't convert. So I should certainly before insert
  > query, modify the date to obtain the right format.

  That is right - try something like the following:

  to_date('#dateformat(date_from_query,"DD/MM/")#','DD/MM/')

  Should work okay for you

  Cheers

  Simon
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]