Board index » delphi » Fields[0] not always Fields[0]??
Guillermo Casta?o A
![]() Delphi Developer |
Mon, 02 Feb 2004 04:55:47 GMT
Fields[0] not always Fields[0]??
Hi, i have a TQuery descendent component that works over queries
assigning them a consecutive value in the DoOnNewRecord procedure. (Then i call the DoOnNewRecord of the ancestor). The field of the consecutive always is created in the first position of the fields. (Query.Fields[0].AsInteger := MyConsec). It works pretty well most of the time, but from time to time an error raises when trying to post the record: "The field 'IdOfMyTable' can't be null" but if you close the application and do the process again, all works fine again. It's like if for some reason i don't understand, referring to Fields[0] not always assign the value to the proper database field. Any ideas? Thanks in advance -- Guillermo Casta?o Acevedo Gerente de Sistemas - Grupo Millennium Ltda Guiller...@GrupoMillennium.com www.GrupoMillennium.com |