Re: Error message "Row cannot be located for updating"

Daniel Kasak <[email protected]>
Newsgroups gmane.comp.db.mysql.odbc
Message-ID <[email protected]>
Jonathan Trahair wrote:

> Hi Everyone
>
> I am using VB6 and MySQL, recently installed. I have a FlexGrid of items. I save them, and in a large order (25 or more) there will be at least one which causes an error "Row cannot be located for updating. Some values may have been changed since it was last read." The values looked up have not changed, the only change might be price or quantity. I tried looking the order items up on their unique record number (primary key), then I tried on their order number, item name and colour (a unique set of values). It's always the same item(s) in a given order, but for different orders it will not be the same item, colour or row number as other orders.
>
> I've been onto Google and found some stuff about Option=2 but that didn't make any difference.
>
> Can anyone shed light on this dark area?
>   

Basically don't use recordsets for updating. Maybe the v5 driver will do 
this properly, but I've never really had much success with the v3.51.x 
driver. Use a read-only recordset for fetching from the database, and 
any changes to the recordset you should send back as 'update table' 
commands. Sad but true. It's not hard to write some functions which 
automate this.

Also as Venu pointed out, it's hard to give more specific answers, and 
possibly point out things you're doing wrong, if you don't actually give 
us any details of what you're doing.

-- 
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [email protected]
website: http://www.nusconsulting.com.au

-- 
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.