Subject | IBO3 to IBO4 compatibility issue |
---|---|
Author | Brian Dunstan |
Post date | 2003-12-31T02:18:03Z |
Jason,
I have found a compatibility issue upgrading from IBO3.6Cf to IBO4.3Aa.
After the upgrade several IBOQueries did not work as before, but gave an
error "XXXX is a required field" when inserting new records.
This is what I have found will provoke the problem.
SQL select * from customer c
join sales s on c.cust_no = s.cust_no
ColumnAttributes CUST_NO=REQUIRED
InsertSQL INSERT INTO SALES(
PO_NUMBER, /*PK*/
CUST_NO,
SALES_REP,
ORDER_STATUS,
ORDER_DATE,
SHIP_DATE,
DATE_NEEDED,
PAID,
QTY_ORDERED,
TOTAL_VALUE,
DISCOUNT,
ITEM_TYPE)
VALUES (
:PO_NUMBER,
:CUST_NO,
:SALES_REP,
:ORDER_STATUS,
:ORDER_DATE,
:SHIP_DATE,
:DATE_NEEDED,
:PAID,
:QTY_ORDERED,
:TOTAL_VALUE,
:DISCOUNT,
:ITEM_TYPE)
Now, put the query into INSERT state and set values for all of the above
parameters and post. An error "CUST_NO is a required field" will result.
The problem appears to be due to CUST_NO appearing twice (CUST_NO and
CUST_NO1) in the SQL statement (not the insert statement). If the SQL is
changed so that CUST_NO appears only once, then everything works as
expected.
Regards,
Brian Dunstan
COMMUNICARE DEVELOPMENT TEAM
Medisys Australia Pty Ltd
08 9332 2433
041 9906 150
08 9310 1516 (fax)
I have found a compatibility issue upgrading from IBO3.6Cf to IBO4.3Aa.
After the upgrade several IBOQueries did not work as before, but gave an
error "XXXX is a required field" when inserting new records.
This is what I have found will provoke the problem.
SQL select * from customer c
join sales s on c.cust_no = s.cust_no
ColumnAttributes CUST_NO=REQUIRED
InsertSQL INSERT INTO SALES(
PO_NUMBER, /*PK*/
CUST_NO,
SALES_REP,
ORDER_STATUS,
ORDER_DATE,
SHIP_DATE,
DATE_NEEDED,
PAID,
QTY_ORDERED,
TOTAL_VALUE,
DISCOUNT,
ITEM_TYPE)
VALUES (
:PO_NUMBER,
:CUST_NO,
:SALES_REP,
:ORDER_STATUS,
:ORDER_DATE,
:SHIP_DATE,
:DATE_NEEDED,
:PAID,
:QTY_ORDERED,
:TOTAL_VALUE,
:DISCOUNT,
:ITEM_TYPE)
Now, put the query into INSERT state and set values for all of the above
parameters and post. An error "CUST_NO is a required field" will result.
The problem appears to be due to CUST_NO appearing twice (CUST_NO and
CUST_NO1) in the SQL statement (not the insert statement). If the SQL is
changed so that CUST_NO appears only once, then everything works as
expected.
Regards,
Brian Dunstan
COMMUNICARE DEVELOPMENT TEAM
Medisys Australia Pty Ltd
08 9332 2433
041 9906 150
08 9310 1516 (fax)