Re: unable to update a table
Posted in 1998
When I do Insert it works, however when I change the data of existing records its not working. This is the code in my powerbuilder application, save button(clicked event). Parent.SetMicrohelp("Saving Data...") IF wf_validate_dw() = TRUE THEN Integer li_returncode li_returncode = dw_1.update() IF li_returncode > 0 THEN COMMIT USING SQLCA; ELSE ROLLBACK USING SQLCA; MessageBox("Update","Update failed",Exclamation!) END IF END IF Parent.SetMicrohelp("Ready") reddyr@jcdcrs4.jobcorps.org wrote: > > Looks like you forgot to COMMIT your transaction!!!!!!! > > COMMIT USING <your_transaction_object_name>; > > In powerbuilder check for return value from the update() function. > > IF dw_1.update() = 1 THEN > COMMIT USING SQLCA; > END IF > > If u are using dynamic SQL then check for the SQLCA.SQLCODE > > IF SQLCA.SQLCODE = 0 THEN > COMMIT USING SQLCA; > ELSE > ROLL BACK USING SQLCA; > //message > END IF > > On Wed, 12 Aug 1998, Syed wrote: > > > Dear friends, > > > > I am having problem with one of my tables, whever I update from > > Application, the update is not really updated in the database, although > > no any error messages produced, however when I use the sql sytax in the > > sql editor the update works. I have set the database logging on. > > > > Your kind help highly appreciated. > > > > Syed. > > -- > > Syed Ibrahim > > Sapura Advanced Systems Sdn. Bhd, 18th Floor, Menara Tun Razak, Jalan > > Raja Laut, 50350 Kuala Lumpur, Malaysia > > Tel: (03) 295-3472, (03) 294-3000 Fax: (03) 294-6587, (03) 293-3154 > > -- Syed Ibrahim Sapura Advanced Systems Sdn. Bhd, 18th Floor, Menara Tun Razak, Jalan Raja Laut, 50350 Kuala Lumpur, Malaysia Tel: (03) 295-3472, (03) 294-3000 Fax: (03) 294-6587, (03) 293-3154