Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Bases de datos > MS SQL Server
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 20-08-2007
[egostar] egostar is offline
Registrado
 
Registrado: feb 2006
Posts: 6.572
Poder: 27
egostar Va camino a la fama
Cita:
Empezado por farmond Ver Mensaje
Para cHackAll - the error only occurs on edit method - insert and delete are OK;

Para Caral - this is part o the code - this form has 3585 lines; The code worked fine before the table grows over 128.000 records - no changes on the code, so the error is not in the code, but in the database connection. In other forms, thar references smaller tables, everything works fine.

Para egostar - AgoraBD : TDateTime;
Please check the params properties from the object inspector and verify that DataHoraAlt parameter has the correct values.

Cita:
datatype = ftDateTime
paramtype = ptInput
Then, change the delphi code to:

Código Delphi [-]
 
   qryProtocolo.FieldByName('DataHoraAlt').Value := AgoraBD;

Regards
__________________
"La forma de empezar es dejar de hablar y empezar a hacerlo." - Walt Disney
Responder Con Cita
  #2  
Antiguo 20-08-2007
farmond farmond is offline
Registrado
 
Registrado: ago 2007
Ubicación: Niterói - RJ - Brasil
Posts: 6
Poder: 0
farmond Va por buen camino
Params checked

Caro egostar,

I've tried your tip, but it doesn't work - the error is not on the code, due on other forms that references to smaller tables it works fine - I think that the problem is on the BDE connection.

Do you have any tip to change the BDE parameters, or a BDE version that works fine?

I'm using Delphi 7.0 build 4.453, BDE Version 5.01, MS-SQL 2000 8.00.194
Responder Con Cita
  #3  
Antiguo 20-08-2007
[egostar] egostar is offline
Registrado
 
Registrado: feb 2006
Posts: 6.572
Poder: 27
egostar Va camino a la fama
Sorry farmond, I have a mistake, I thought that you were using ParamByName insted of FieldByName.

Are you sure that the record you are trying to update is the correct one?

So, I'll have to keep a close eye on this issue in order to see if I can help you.

Regards.
__________________
"La forma de empezar es dejar de hablar y empezar a hacerlo." - Walt Disney
Responder Con Cita
  #4  
Antiguo 20-08-2007
[egostar] egostar is offline
Registrado
 
Registrado: feb 2006
Posts: 6.572
Poder: 27
egostar Va camino a la fama
Hi farmond

Can you change the RequestLive property from your qryProtocolo component to True?

Let me know what happends

Regards.
__________________
"La forma de empezar es dejar de hablar y empezar a hacerlo." - Walt Disney
Responder Con Cita
  #5  
Antiguo 20-08-2007
farmond farmond is offline
Registrado
 
Registrado: ago 2007
Ubicación: Niterói - RJ - Brasil
Posts: 6
Poder: 0
farmond Va por buen camino
Step into code

Caro egostar,

I've used Step by step debugging to find the error - the pointer is setting to the edited record. I've passed by all the lines of the code, and error has ocurred just in this event:

qryProtocolo.Post;

I'm using this code as default to other applications that works with smaller tables, and it's working fine.
I've wrote this same code using ADO connection, and it's worked fine.
So, I should tell tou that the code is right - the trouble occurs in the BDE connection - and it's very difficult to finda a solution.

I'm posting to this forum because I've found interesting articles here.
Sorry if I'm typing in enlglish, but I don't know how to write anything in Spanish.
Responder Con Cita
  #6  
Antiguo 20-08-2007
[egostar] egostar is offline
Registrado
 
Registrado: feb 2006
Posts: 6.572
Poder: 27
egostar Va camino a la fama
Hi farmond,

Check this link

Regards
__________________
"La forma de empezar es dejar de hablar y empezar a hacerlo." - Walt Disney
Responder Con Cita
  #7  
Antiguo 20-08-2007
farmond farmond is offline
Registrado
 
Registrado: ago 2007
Ubicación: Niterói - RJ - Brasil
Posts: 6
Poder: 0
farmond Va por buen camino
MySQL properties <> Delphi properties

Caro egostar,
the link you've send me is listed above, comments in red:
<<
Dear All,
I am porting a Delphi6 & BDE Paradox project onto MySQL 4.1 Server. To access MySQL, I am using BDE & MyODBC 3.51.12

SIMPLY
1. Set "return mactching rows" to enabled. It's MySQL property.
2. Alter your table(s) so there are enough number of unique fields(I altered one field as primary key). I just have 1 primary key


DETAILED
STEP 1. I got same error message. Then, I checked the table which error occurs. I set the "Return matching rows" to checked (in system data sources ->Configure->Advanced->Flags1 /3.51.12.00).

Then I saw that error message changed (to something like "more records when expecting only one). So, I checked my table. There were a lot of dublicate records. No, I had no primary, unique, index, etc. to prevent this situation on SQL server side, but I have code to prevent in client side (A code simply using TDataSet Find method). I understood that Find method does not work well.

STEP 2. I deleted the duplicatd records and alterer one of fields in table as primary key. Ooops, the error message was gone No duplicate records
>>

I'd like to know if someone has an ODBC version newer then 3.525.1117.0 (for Win2K / XP)
Responder Con Cita
  #8  
Antiguo 20-08-2007
Avatar de eduarcol
[eduarcol] eduarcol is offline
Miembro Premium
 
Registrado: ago 2003
Ubicación: En los estados Zulia y Merida de Venezuela
Posts: 4.151
Poder: 27
eduarcol Va por buen camino
A ver lo coloco en español y cualquier cosa me ayudan

Se me ocurre que esa tabla debe estar siendo trabajada en red, por lo tanto algun otro usuario modifico el registro antes del post y se genera esa excepcion, es lo que estoy entendiendo de la traduccion del error.

Como el amigo no escribe mas codigo en el que esta la apertura y edicion de la tabla es muy dificil imaginar que puede suceder entre el edit y el post.

Cita:
Empezado por traductor de google
My english is very bad, excuse me

It is happened to me that that table must be being worked in network, therefore some other user modify the registry before post and that exception is generated, is what I am understanding of the translation of the error.

As the friend does not write but code in which this the opening and edition of the table is very difficult to imagine that it can happen between edit and post.
__________________
...Yo naci en esta ribera del arauca vibr@d0r
Soy hermano de la espuma,
de la garza, de la rosa y del sol...
Viva Venezuela
Responder Con Cita
  #9  
Antiguo 21-08-2007
Avatar de Gabo
[Gabo] Gabo is offline
Miembro Premium
 
Registrado: mar 2007
Ubicación: Murcia (España)
Posts: 684
Poder: 20
Gabo Va por buen camino
Cita:
Empezado por eduarcol Ver Mensaje
Se me ocurre que esa tabla debe estar siendo trabajada en red, por lo tanto algun otro usuario modifico el registro antes del post y se genera esa excepcion, es lo que estoy entendiendo de la traduccion del error.
Creo lo mismo, ese error me parece un problema de concurrencia...

Perdonen si digo una tontera, pero ¿no es un problema de la configuración de la transacción? Por ejemplo, en el caso de usar un componente IBTransaction, ¿no se solucionaría estableciendo la propiedad Read Comitted?
Responder Con Cita
  #10  
Antiguo 21-08-2007
Avatar de eduarcol
[eduarcol] eduarcol is offline
Miembro Premium
 
Registrado: ago 2003
Ubicación: En los estados Zulia y Merida de Venezuela
Posts: 4.151
Poder: 27
eduarcol Va por buen camino
Cita:
Empezado por Gabo Ver Mensaje
Creo lo mismo, ese error me parece un problema de concurrencia...

Perdonen si digo una tontera, pero ¿no es un problema de la configuración de la transacción? Por ejemplo, en el caso de usar un componente IBTransaction, ¿no se solucionaría estableciendo la propiedad Read Comitted?
Seria maravilloso pero esta trabajando con el BDE
__________________
...Yo naci en esta ribera del arauca vibr@d0r
Soy hermano de la espuma,
de la garza, de la rosa y del sol...
Viva Venezuela
Responder Con Cita
Respuesta


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
applyupdates (record not found or changed by another user) Stell Conexión con bases de datos 4 13-05-2008 13:36:20
Error: "Record not found or changed by another user" jmlifi Varios 0 27-01-2006 10:16:57
Record not found or changed by another user felixgo Conexión con bases de datos 1 30-09-2005 13:07:40
Record not found or changed by another user. Luis Conexión con bases de datos 2 12-08-2005 19:50:45
error couldn't perform the edit because another user changed the record marcelofabiani Conexión con bases de datos 3 25-01-2005 01:55:11


La franja horaria es GMT +2. Ahora son las 03:37:06.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi