Subject | Re: [IBO] Update Bug in IBO4? |
---|---|
Author | Jason Wharton |
Post date | 2001-08-23T19:10:57Z |
I think you might be better served in a general ib/fb support forum. This
appears to be an issue with your database.
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
appears to be an issue with your database.
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
----- Original Message -----
From: "Paul Schmidt" <paul@...>
To: <IBObjects@yahoogroups.com>
Sent: Thursday, August 23, 2001 9:12 AM
Subject: [IBO] Update Bug in IBO4?
Dear List:
I think I may have found a bug in IBO4.
Okay, control TIB_Query
property SQL contains SELECT * FROM PHASE
Table is defined thusly:
CREATE TABLE TABLENAME (
PHASE_ID INTEGER, /* this is the primary key */
.... );
there is a generator attached to PHASE_ID and the generator links is
defined properly.
On an update, it gives me a primary key violation.
Funny, it worked on IBO 3.6
Used a TIB_Monitor to see what is happening, and it created the
following:
/*---
COMMIT
TR_HANDLE = 14902168
SECONDS = 0.051
----*/
/*---
START TRANSACTION
DB HANDLE COUNT 1
TR_HANDLE = 14902168
SECONDS = 0.014
----*/
/*---
EXECUTE STATEMENT
TR_HANDLE = 14902168
STMT_HANDLE = 14900684
PARAMS = [ ]
SECONDS = 0.015
----*/
/*---
EXECUTE STATEMENT
TR_HANDLE = 14902168
STMT_HANDLE = 14900684
PARAMS = [ ]
SECONDS = 0.013
----*/
/*---
PREPARE STATEMENT
TR_HANDLE = 14902168
STMT_HANDLE = 14897944
UPDATE PHASE
SET PHASE_ID = ? /* PHASE_ID */
, PROJECT_ID = ? /* PROJECT_ID */
, MYOB_TASK_NO = ? /* MYOB_TASK_NO */
, DESCRIPTION = ? /* DESCRIPTION */
, EST_DAYS = ? /* EST_DAYS */
, EST_PRICE = ? /* EST_PRICE */
, EST_NR_COSTS = ? /* EST_NR_COSTS */
, EST_REIMB_COSTS = ? /* EST_REIMB_COSTS */
, EST_START_DATE = ? /* EST_START_DATE */
, EST_END_DATE = ? /* EST_END_DATE */
, NUMBER_OF_TASKS = ? /* NUMBER_OF_TASKS */
, COMPLETE_TASKS = ? /* COMPLETE_TASKS */
WHERE PHASE.PROJECT_ID = ? /* OLD_PROJECT_ID */
PLAN (PHASE NATURAL)
FIELDS = [ Version 1 SQLd 0 SQLn 30 ]
SECONDS = 0.221
----*/
/*---
EXECUTE STATEMENT
TR_HANDLE = 14902168
STMT_HANDLE = 14897944
PARAMS = [ Version 1 SQLd 13 SQLn 13
PHASE.PHASE_ID = 6
PHASE.PROJECT_ID = 6
PHASE.MYOB_TASK_NO = '10852'
PHASE.DESCRIPTION = 'Phase Test 5'
PHASE.EST_DAYS = 5
PHASE.EST_PRICE = 450
PHASE.EST_NR_COSTS = 0
PHASE.EST_REIMB_COSTS = 0
PHASE.EST_START_DATE = '21 Jul 2001'
PHASE.EST_END_DATE = '31 Jul 2001'
PHASE.NUMBER_OF_TASKS = 1
PHASE.COMPLETE_TASKS = 0
PHASE.PROJECT_ID[OLD_PROJECT_ID] = 6 ]
SECONDS = 0.632
ERRCODE = 335544665
----*/
/*---
INTERPRETE BUFFER = IPTION = 'Phase Test 5'
PHASE.EST_DAYS = ÔÛÒ
SECONDS = 0.068
ERRCODE = 73
----*/
/*---
INTERPRETE BUFFER = violation of PRIMARY or UNIQUE KEY constraint
"PK_PHASE" on table "PHASE"
ERRCODE = -1
----*/
I looked at the data, and the PHASE_ID for this record is already 6,
so why would it try setting it to 6. I know I could work around this
by eliminating the field from the UpdateSQL, but that falls into the
PITA category when one is dealing on some projects with nearly 100
tabes, and some of those have over 100 records in each.
I am using Firebird 0.9.4, Delphi 3. and IBO4.2.Eb
Anyone have any ideas?
Paul Schmidt,
Tricat Technologies
Email: paul@...
Website: www.tricattechnologies.com