Skypu lovecam - Cannot located row updating

Create(Application);with ado Tbl dobegin Table Name := 'Tbl_Test';// Actual names in Connection String replaced by dummies for posting inpublic newsgroup Connection String := 'Driver=; Server=XXX; Port=3306; Database=YYY; UID=ZZZ; Pwd=PPP;';try Open;// Fld_ID is an integer field set as primary keyif Locate('Fld_ID', n Rec ID, [])thenbegin// Fld_Bin Data is a My SQL BLOB fieldfld := Field By Name('Fld_Bin Data'); Edit;if fld is TVar Bytes Fieldthenbegintryif (p Stream = nil) or (p Stream. Size 2; Get Mem(buffer, sze); Zero Memory(buffer, sze);pw := Pointer(buffer);// First 2 bytes of TVar Bytes Field data contain data lengthpw ^ := sze - 2;if sze see thread "TADOTable exception when post second time" on the03/08/2005.--Best regards :-)Guillem Vicens Meier Dep. clubgreenoasis.com--Contribute to the Indy Docs project: order to contact me remove the -nospam see thread "TADOTable exception when post second time" on the03/08/2005.--Best regards :-)Guillem Vicens Meier Dep. clubgreenoasis.com--Contribute to the Indy Docs project: order to contact me remove the -nospam Thanks for the reply, Guillem.

I tried 2 things that I found in that thread:- Change cursor location to server side. This doesn't make adifference, I still get the same exception.

This is apparently not supported bythe database or driver.- Set ado Tbl. Meanwhile I noticed that I only get the exception once the blob field isfilled in.

cannot located row updating-24

Advantage isthat I can create a blob stream and use that to do the update.

This worksperfectly when tested on a SQL Server database, but not on My SQL.

Cheers, Guyprocedure Set Binary Value(n Rec ID: Integer; p Stream: TStream);type// Upper bound not relevant LTChar Arr = array [0 ..

2] of Char;varado Tbl: TADOTable;fld: TField;buffer: ^ LTChar Arr;sze: Integer;pw: ^ Word;beginado Tbl := TADOTable.

You have not included a unique record identifier in your selectstatement and you have to.

Let's say you have a table: Table: Sales Guys Sales ID autoinc Sales Name text/stringand you use this table in a grid where you wrote:select Sales Name from Sales Guys order by Sales Guys If you allow editing and attempt to make a correction/edit, you getthe error you describe.solutionchange your SQL to include the unique record id:select Sales ID, Sales Name from Sales Guys order by Sales Guys.Please start any new threads on our new site at https://forums. We've restricted the ability to create new threads on these forums. No problem getting it to work, however I do seem to get an error every time I try to make a change to the table from within my software that accesses the database. ITEM_NO and PREQ_NO IN (SELECT PREQ_NO FROM INSERTED); END; Row cannot be located for updating. Is that showing the name of the trigger (it will, helpfully, if that's where the error is occurring)One other question, you are updating the same table in which you are inserting a value.We've got lots of great SQL Server experts to answer whatever question you can come up with. Here is the trigger: CREATE TRIGGER Update Preq Brand_trigger ON PO_PREQ_LIN AFTER INSERT AS BEGIN update PO_PREQ_LIN set PO_PREQ_LIN. ADDL_DESCR_2 from PO_PREQ_LIN, IM_ITEM where PO_PREQ_LIN. Some values may have been changed since it was last read Row cannot be located for updating. Why not get the value from IM_ITEM during insert itself.Some values may have been changed since it was last read [Insert] [SELECT * FROM [PO_PREQ_LIN] WHERE (1=0) ] SELECT c. Why do you need a trigger to update it after the INSERT has been done? deleting an item):"This is an INSERT trigger, so won't fire on a DELETE (unless there is a Delete Trigger there which is trying to INSERT back again )The error should indicate the line number but also the name of the object where the error occurred.I've been onto Google and found some stuff about Option=2 but that didn't make any difference.

Tags: , ,