Subject RE: [IBO] Insert problem/question upgrading from v4.8
Author IBO Support List
One thing that could be a factor is your setting of BufferSynchroFlags.
What is that property set to for that query?

Thanks,
Jason Wharton
www.ibobjects.com


-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]
Sent: Monday, February 9, 2015 11:01 PM
To: IBObjects@yahoogroups.com
Subject: [IBO] Insert problem/question upgrading from v4.8

Hello,



I am upgrading a program from delphi7, ibo v4.8 to the newest ibo v5.5.5.



I have come across a section of code where a query contains



SELECT *

FROM ORDERSM

WHERE OM_ID = :ID



the Delphi code does the following



qyOrdersM.Insert;

xOM_ID := qyOrdersM.FieldByName('OM_ID').AsInteger;

qyOrdersM.FieldByName('OM_CONSOLIDATED_ID').AsInteger:=xOM_ID;

qyOrdersM.FieldByName('OM_CUS_ID').AsInteger := xKeyCustomer;

qyOrdersM.Post;



qyOrdersM.Edit;



the edit is causing an exception of

"Cannot Edit current Row"



I know that the code was working before the upgrade of IBO.



-------------------------------------

I can fix this by inserting the following 3 lines before the "Edit"

qyOrdersM.Close;

qyOrdersM.ParamByName('ID').AsInteger := xOM_ID;

qyOrdersM.Open;





But is this the best way to handle it?





Are there any other problems I am likely to run into while doing the
conversion?



Thanks

Michael Horne





[Non-text portions of this message have been removed]



------------------------------------
Posted by: "Michael Horne" <guardian_yahoo@...>
------------------------------------

___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
http://tracker.ibobjects.com - your portal to submit and monitor bug reports
http://community.ibobjects.com - your portal to purchase and upgrade
------------------------------------

Yahoo Groups Links