[EMAIL PROTECTED] wrote

> I am working with SAPDB7.3.0.15 on Linux and found two 
> problems when using a new
> unicode database with DEFAULT_CODE set to UNICODE.
> 
> For my tests I created a simple table and an update-trigger 
> for that table:
> 
> CREATE TABLE Tabelle1 (
>     pk          SERIAL PRIMARY KEY,
>     daten1        varchar(200) ,
>     daten2        varchar(200)
> )
> 
> CREATE TRIGGER update_trigger FOR tabelle1
> AFTER UPDATE EXECUTE
> BEGINPROC
>       IF OLD.daten1 = NEW.daten1 THEN
>       BEGIN
>             STOP( -505, 'TRIGGER FAILED!' );
>       END;
> ENDPROC;
> 
> Inserting a new row with the following insert-statement 
> causes a native DB error
> -3016 (Invalid numeric constant).
> It works fine with a non-unicode database.
> 
> insert into tabelle1 ( daten1, daten2 ) values ('TESTDATEN1', 
> 'TESTDATEN2' )
> 
> After changing the statement to "insert into tabelle1( pk, 
> daten1, daten2)
> values (0,.......)" the row is inserted.


       Please use the neweset kernel-version (7.3.0.20) available.
       We changed several things with serial since 7.3.0.15
       and your problem was solved with 7.3.0.18.

       
> Now I tried the trigger functionality with the update below, 
> and .... the
> trigger fails.
> 
> update tabelle1 set daten1='TESTDATEN2', daten2='TEST' WHERE pk=2
> 
> 
> Any ideas what went wrong?


      Yes, I have one, a very concrete one:
       there is a bug in the kernel which will be fixed with the next
version.
       You can avoid this bug by that time if you do NOT use columns
       with datatype
       (VAR)CHAR (n) ASCII/BYTE/EBCDIC with n > 254
       (VAR)CHAR (n) UNICODE                 with n > 127
       IF and only IF you need their values in triggers.
       Outside triggers they will work fine.

       With your DEFAULT_CODE=UNICODE and CHAR (200)  
       you exceeded the limit of 127 for CHAR (n) UNICODE

Elke
SAP Labs Berlin 
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to