2632049 Bug No: 2632049 Filed 18-OCT-2002 Updated 29-JAN-2003 Product Oracle Forms Product Version 9.0.2.7.0 Platform Microsoft Windows 2000 Platform Version No Data Database Version 9.0.2.0.0 Affects Platforms Generic Severity Severe Loss of Service Status Closed, Not a Bug Base Bug N/A Fixed in Product Version No Data Problem statement: MAX. LENGTH OF A FIELD IS NOT RESTRICTED WHEN ENTERING MULTI BYTE DATA *** 10/18/02 01:33 am *** . . Detailed Problem Description ============================= Max. Length of a field is not restricted when entering Multi byte data after setting the "Data Length Semantics" property of the multi byte field to CHAR. This behaviour is exibited only when the user copies and paste's the data. But when the data into the field is entered manually the size is restricted. . As more data is getting entered, when saved through forms this error is raised : ORA-01401: inserted value too large for column . Diagnostic Analysis ==================== This is happening only for Multi byte data that is copied and pasted. . . Generic/Port-specific findings ============================== I have tested with Form 9.0.2.7.0, and Jinitiator 1.3.1.9 . Environment ============ Platform ProductVersion Reproduced ---------- ---------------- -------------- Win 2000 9.0.2.7.0 Y RedHatLinux 9.0.2.7.0 Y . Testcase step-by-step instructions ==================================== 1] Create a field that will store chinese characters with Varchar2(12) [ Structure given below] to Char. 3] Type in some chinese characters. This field will accept only the stipulated number of characters ( something like 4 chinese characters) 4] Now save this. This gets commited to the database with out any errors. 5] Insert a new record 6] Now copy and paste some chinese characters multiple times into this newely created field. 7] Now when this newely pasted data is saved forms gives : ORA-01401: inserted value too large for column . . Testcase location =================== Create a table with the following structure in a UTF8 database. Create table len_test (COL1 VARCHAR2(12)). Then run the form provided below. . Files uploaded : Screen shot,Forms 9i form. files located at ess30 - /bug/bug2632049 . . . . Available Workarounds ====================== 1] Set Data Length Scemantics to Byte 2] Enter data manually and do not copy and paste data in to the field . Related bugs ============= None . *** 10/22/02 06:40 am *** (CHG: Asg->NEW OWNER) *** 10/28/02 12:16 am *** *** 10/28/02 02:58 am *** The behavior described here is correct: - in the database byte length is defined (*) - in the form char length is defined So you are allowed to enter 12 characters into the forms. But all these Chinese characters you have entered are at least 2 bytes long. So you cannot insert these into the DB. You have to define character length in the DB, if you want to use character length in the form. *** 10/28/02 03:19 am *** (CHG: Sta->32) *** 10/28/02 03:19 am *** (*) You can check with: SELECT CHAR_USED FROM USER_TAB_COLUMNS WHERE TABLE_NAME='LEN_TEST'; In this case here 'B' for Byte is returned. See Oracle 9i SQL Reference Manual, page 10-56/10-57. Create the table with this statement to use char length: CREATE TABLE LEN_TEST (COL1 VRACHAR2(12 CHAR)); Now the above query returns 'C' for Character. *** 10/28/02 03:24 am *** Yes, as explained by me in the bug earlier form sdoes restrict the length of chinese characters correctly when entering via the keyboard. But, when copying and pasting characters this character restriction seems to be ignored by forms. - Thanks *** 10/28/02 03:25 am *** (CHG: Sta->16) *** 10/28/02 03:56 am *** (CHG: Sta->32) *** 10/28/02 03:56 am *** The behavior you are describing is correct for Forms 6i where we had no Character Semantics Support. Before Forms 9i we only had Byte Length. But now we can decide if we want to use Byte Length - the default - or Character Length. You should use the same length type in the DB and in Forms to avoid errors. See Note 202748.1 for details. *** 11/15/02 07:23 am *** *** 01/29/03 08:59 am *** (CHG: Sta->92) .