Forms 5.0: Built-in Name_In()

From: Rolf Unger <rolf.unger_at_ctilabs.de>
Date: 9 Dec 2002 06:29:08 -0800
Message-ID: <32fe19ad.0212090629.3df16ae6_at_posting.google.com>



Hi all,

I'm working with Oracle Forms 5.0 and have some problems with the built-in function Name_In() when using it on items that show date fields of a table.

Name_In() returns a VARCHAR2 type, so it seems to do a type conversion internally. The following is "my" code -- okay, it's code that is from the f50write packages, that comes with the Developer2000 Demos.

  item_format := get_item_property(item_id, format_mask);

  if item_type1 in ('DATE','DATETIME') then     item_date := name_in(item_name);
    item_value := to_char(item_date,item_format);   else
    item_value := name_in(item_name);
  end if;

For date values i get an exception:

ORA-01830: date format picture ends before converting entire input string

The format mask for the item as set in the static properties is: HH24:MI:SS DD.MM.YYYY

As I'm using Windows NT, I have somewhere in the Registry the settings for the default date format:

  NLS_DATE_FORMAT = dd.mm.yyyy hh24:mi:ss

Okay, that's not the same, but anyway the exception is thrown before the 'to_char(item_date,item_format)'!

So it must happen in the Name_In().

Strange enough, if I do a simple

   item_value = name_in(item_name);

for all types of items (also for the date fields) I do get

         12-APR-2000 with item format HH24:MI:SS DD.MM.YYYY and

         12-APR-00 with item format HH24:MI:SS

So 'Name_In()' seems to ignore my locale settings completely.

Any comments are apreciated ...

Rolf. Received on Mon Dec 09 2002 - 15:29:08 CET

Original text of this message