Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Conexión con bases de datos (https://www.clubdelphi.com/foros/forumdisplay.php?f=2)
-   -   Problemas al actualizar un TClientDataset y ADO (https://www.clubdelphi.com/foros/showthread.php?t=16472)

PEDRO_PASAMAR 29-11-2004 18:57:55

Problemas al actualizar un TClientDataset y ADO
 
Buenas ... Estoy intentando hacer un edit de un registro obtenido de un ADOStoredProc (SQL Server 2000) con un clientdataset y al hacer el post me da el error 'Try to modify readonly field' en un campo integer que no está marcado como tal. Uso el Delphi 7 con el primer parche. Que hago mal ?

Gracias por adelantado

Pedro E. Pasamar Vidal

Cabanyaler 30-11-2004 10:52:46

¿Has comprobado los derechos del usuario con el cual te conectas a la BBDD en el SQL server?, puede que no tenga derechos de escritura.

También te remito a la ayuda del TADODataSet, y más en concreto al atributo LockType, puede ser que lo tuvieses como ReadOnly:

Cita:

TCustomADODataSet.LockType
Specifies the lock type to use when opening a dataset.

property LockType: TADOLockType;

Description

Use LockType to specify the lock type to use when opening a dataset. LockType determines whether the row locking scheme for a recordset will be pessimistic, optimistic, or read-only. To be effective, LockType must be set prior to activating the ADO dataset component.

The default value of LockType is ltOptimistic.

Use the LockType ltBatchOptimistic to open a dataset in batch update mode.
Es lo primero que se me ocurre.
Suerte.


La franja horaria es GMT +2. Ahora son las 17:36:50.

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