From: Date: September 12 2005 7:45pm Subject: RE: Update problem List-Archive: http://lists.mysql.com/myodbc/10346 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I turned on logging, what I got is this: UPDATE `sweet`.`traspasos` SET `FOLIO_TRASPASO`=3D1,`ORIGEN`=3D'VD',`DESTINO`=3D'JR',`FECHA`=3D'20050912= ',`HORA`=3D'1 0:39:43',`CODRESPON`=3D'CARLOS',`TERM`=3D'CARLOS',`STATUS`=3D'2',`OBSERVA= CIONES`=3D' ok. guardar para continuar despues' WHERE `FOLIO_TRASPASO`=3D1 AND `ORIGEN`=3D'VD' AND `DESTINO`=3D'JR' AND `FECHA`=3D'20050908' AND `HORA` = IS NULL AND `CODRESPON`=3D'CARLOS' AND `TERM`=3D'CARLOS' AND `STATUS`=3D'2' AND `OBSERVACIONES`=3D'ok. guardar para continuar despues' AND = `CONSECUTIVO`=3D1 I think the error is the column FECHA because the date format is "YYYY-MM-DD" and then column HORA in the selected recordset is not null, it's "00:00:00". -----Mensaje original----- De: David Dindorp [mailto:ddi@stripped]=20 Enviado el: Lunes, 12 de Septiembre de 2005 01:36 a.m. Para: Carlos Daniel Olivas Barba CC: myodbc@stripped Asunto: RE: Update problem Carlos Daniel Olivas Barba wrote: > I have a problem when updating a recordset I got a message that says = "The > row for update can=B4t be found: Some of the values may changed since = last > read", or something like that because the original message is in = Spanish, > this happens only when updating rows when updating tables with = datetime > type columns. Turn on query logging on your MySQL server using the 'log' option in = either my.ini or the mysqld command line. In the query log, find the UPDATE statement that fails and examine it's WHERE clause. If you post it = here, also include the data row that you expected the update to match. > This is the table definition: >=20 > 'FOLIO_TRASPASO', 'bigint(20)', '', '', '0', '' > 'ORIGEN', 'varchar(15)', '', 'MUL', '', '' > 'DESTINO', 'varchar(15)', '', 'MUL', '', '' > 'FECHA', 'date', 'YES', '', '', '' > 'HORA', 'time', 'YES', '', '', '' > 'CODRESPON', 'varchar(15)', 'YES', '', '', '' > 'TERM', 'varchar(20)', 'YES', '', '', '' > 'STATUS', 'char(1)', 'YES', '', '0', '' > 'A_DISCO', 'enum('Y','N')', 'YES', '', 'N', '' > 'FOLIO_REF', 'int(11)', 'YES', '', '0', '' > 'OBSERVACIONES', 'varchar(200)', 'YES', '', '', '' > 'CONSECUTIVO', 'bigint(20) unsigned', '', 'PRI', '', 'auto_increment' > 'MOTIVO_CANCELADO', 'varchar(200)', 'YES', '', '', '' Perhaps try a 'datetime' column.