Re: Updating Primary Key
Posted in 2000
I tried putting it running it as follows :
run 'dbaccess -e <dbname> <scriptfile> 2>&1 | tee mylogfile.
but it still gives syntax error at line :
update order....
Vinod Bhansali
************************************************************
Contents of mylogfile :
Database selected.
begin work;
Started transaction.
--set constraints for order disabled;
--set constraints for item disabled;
set constraints all deferred;
Constraint mode set.
delete from item where 1=1;4 row(s) deleted.
delete from order where 1=1;1 row(s) deleted.
insert into order values(1,"cust","city",100);1 row(s) inserted.
insert into item values (1,"item1",1);1 row(s) inserted.
insert into item values (1,"item2",2);1 row(s) inserted.
insert into item values (1,"item3",3);1 row(s) inserted.
insert into item values (1,"item4",4);1 row(s) inserted.
UPDATE order SET orderno = 2 where orderno = 1; 201: A syntax error has occurred.
Error in line 23Near character position 8
377: Must terminate transaction before closing database.
853: Current transaction has been rolled back due to erroror missing COMMIT WORK.
*********************************************************************
>From: Raj Muralidharan <raj.muralidharan@informix.com>
>To: "Vinod Bhansali" <iiug@hotmail.com>
>Subject: Re: Updating Primary Key
>Date: Wed, 31 May 2000 17:12:38 -0400
>
>Vinod,
>
>As I stated in my previous email, your code works. Make sure you do the
>following:
>
>begin work;
>
>set constraints all deferred;
>
>update order....
>update item ...
>
>commit work;
>
>If you are still having problems, do the following:
>
>1. put the statements above in a script file.
>2. set the env. variable DBACCESSNOIGN=1
>3. run 'dbaccess -e <dbname> <scriptfile> 2>&1 | tee mylogfile.
>
>Send me this logfile along with your informix version details and I will
>see if there are any known issues. If you can do this within the next 10
>minutes, I will be here. Otherwise, I will respond tomorrow.
>
>
>
>
>Regards
>Raj
>
>
>
>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>Informix
>Raj Muralidharan INFORMIX SOFTWARE Inc.
>Principal Engineer 8065 Leesburg Pike
>Advanced Technology Group Suite 700
>Tel: (703) 714-0606 Vienna, VA 22182
> (703) 847-2900
>Mobile: (703) 622-3541
>EFAX: (603) 584-0250
>FAX: (703)
>714-0699
><mailto:rmurali@informix.com>mailto:raj.muralidharan@informix.com
>
>Text Messaging: E-Mail to 7036223541@mobile.att.net (max 100 chars)
>
>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com