Subject | Re: Can not commit transaction-in ibexpert |
---|---|
Author | sivram_mail <sivaraman@softwareassociate |
Post date | 2003-01-13T14:34:34Z |
Thanks Martin,
now i find out the problem.
This is the ddl .
CREATE TABLE BATCHMASTER (
BATCHNUMBER CHAR(10) CHARACTER SET NONE NOT NULL,
ITEMCODE CHAR(5) CHARACTER SET NONE NOT NULL,
PRODUCTSERIALNUMBER SMALLINT NOT NULL,
BATCHCST NUMERIC(9,2) Default 0.00,
BATCHMRP NUMERIC(12,2) Default 0.00,
BATCHSELLINGRATE NUMERIC(12,2) Default 0.00,
BATCHTPS NUMERIC(9,2) Default 0.00,
EXPIRYDATE VARCHAR(8) CHARACTER SET NONE,
PURCHASECOST NUMERIC(12,3),
STOPBILLING CHAR(1) CHARACTER SET NONE Default 'N',
BATCHSTOCK INTEGER Default 0,
EXPIRY COMPUTED BY (lefts(EXPIRYDATE,4) || rights(rtrim
(EXPIRYDATE),2) ),
BATCHRATE COMPUTED BY (BATCHSELLINGRATE),
BATCHLOOSESTOCK NUMERIC(18,3) Default 0);
expiry field is computed automatically..
After removing expiry field from update statement , now the procedure
is commited.
Thanks for ur help.
Sivaraman
--- In ib-support@yahoogroups.com, "Martijn Tonies" <m.tonies@u...>
wrote:
now i find out the problem.
This is the ddl .
CREATE TABLE BATCHMASTER (
BATCHNUMBER CHAR(10) CHARACTER SET NONE NOT NULL,
ITEMCODE CHAR(5) CHARACTER SET NONE NOT NULL,
PRODUCTSERIALNUMBER SMALLINT NOT NULL,
BATCHCST NUMERIC(9,2) Default 0.00,
BATCHMRP NUMERIC(12,2) Default 0.00,
BATCHSELLINGRATE NUMERIC(12,2) Default 0.00,
BATCHTPS NUMERIC(9,2) Default 0.00,
EXPIRYDATE VARCHAR(8) CHARACTER SET NONE,
PURCHASECOST NUMERIC(12,3),
STOPBILLING CHAR(1) CHARACTER SET NONE Default 'N',
BATCHSTOCK INTEGER Default 0,
EXPIRY COMPUTED BY (lefts(EXPIRYDATE,4) || rights(rtrim
(EXPIRYDATE),2) ),
BATCHRATE COMPUTED BY (BATCHSELLINGRATE),
BATCHLOOSESTOCK NUMERIC(18,3) Default 0);
expiry field is computed automatically..
After removing expiry field from update statement , now the procedure
is commited.
Thanks for ur help.
Sivaraman
--- In ib-support@yahoogroups.com, "Martijn Tonies" <m.tonies@u...>
wrote:
> Hello,
>
> > While commiting the stored procedure, i am getting this error.
>
> What is the DDL of the table BATCHMASTER?
>
> >
> > Cannot commit transaction:
> > This column cannot be updated because it is derived from an SQL
> > function or expression.
> > attempted update of read-only column.
> >
> > What is the problem in my stored procedure?
> >
> > UPDATE BATCHMASTER SET BATCHCST=:BATCHCST,
> > BATCHMRP=:BATCHMRP,
> > BATCHSELLINGRATE=:BATCHSELLINGRATE,
> > BATCHTPS=:BATCHTPS,
> > EXPIRYDATE=:EXPIRYDATE,
> > PURCHASECOST=:PURCHASECOST,
> > STOPBILLING=:STOPBILLING,
> > BATCHSTOCK=:ORGBATCHSTOCK+:TRANSFERQUANTITY,
> > EXPIRY=:EXPIRY,BATCHRATE=:BATCHRATE
> > WHERE BATCHNUMBER=:BATCHNUMBER AND
> > PRODUCTSERIALNUMBER=:PRODUCTSERIALNUMBER AND
> > ITEMCODE=:ITEMCODE;
> >
> > This is the sql in the stored procedure.
>
>
> With regards,
>
> Martijn Tonies
> InterBase Workbench - the developer tool for InterBase & Firebird
> Firebird Workbench - the developer tool for Firebird
> Upscene Productions
> http://www.upscene.com
>
> "This is an object-oriented system.
> If we change anything, the users object."