Subject Insert problem/question upgrading from v4.8
Author Michael Horne
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]