Hi,

I think the reason is constraint, because i'm inserting current year value
(2004) that fits to smallint. Table does not have any triggers. Currently
everything seems to work OK (as I mentioned, problems occur only sometimes),
if I be lucky to catch the situation, I will send vtrace.

Regards,
Donatas

-----Original Message-----
From: Zabach, Elke [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 08, 2004 12:14 PM
To: 'Donatas Ciuksys'; [EMAIL PROTECTED]
Subject: AW: Constraint fails though should not

Donatas Ciuksys wrote
> 
> Hello,
> 
> I'm using MaxDB 7.5.00.15 on fedora core 2. There is constraint defined
> for
> one table (see below).
> Sometimes, when I insert values into this table (via JDBC prepared
> statement), I get error 300. What is interesting, that most often insert
> statements work OK, but sometimes this constraint stops insertion. I'm
> sure,
> that data is OK (program is checking this before insertion).
> 
> Regards,
> Donatas

You are sure that the EXPLICIT given constraint is the reason for error 300
and not the implicit constraint for smallint (-32768 .. 32767) ?!

If you are sure that your explicit constraint causes the trouble (and there
are no insert-trigger specified for this table), please provide a vtrace for
the command causing the error 300

http://sapdb.2scale.net/moin.cgi/VTrace
(change    default    to default order   in step 1 and 6 )

plus the full table definition

Elke
SAP Labs Berlin
> 
> ------------------------------------------------------------
> CREATE TABLE "ADMIN"."KORTELE"
> (
>       "K_ID"               Integer    NOT NULL,
>       "K_NR"               Integer    NOT NULL,
>       "K_DATA"               Date    NOT NULL,
> 
>       ...
> 
>       "K_DARBU_ATLIKIMO_METAI"               Smallint    NOT NULL,
> 
>       ...
> 
>       PRIMARY KEY ("K_ID"),
>       CONSTRAINT "CNSTR_DARBU_ATLIKIMO_METAI" CHECK
> "K_DARBU_ATLIKIMO_METAI" = YEAR(K_DATA),
> 
>       ...
> )
> 
> 
> --
> MaxDB Discussion Mailing List
> For list archives: http://lists.mysql.com/maxdb
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to