Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Conexión con bases de datos
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Conexión con bases de datos

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 07-02-2005
jgutti jgutti is offline
Miembro
 
Registrado: may 2003
Posts: 189
Poder: 22
jgutti Va por buen camino
zeos y campo calculado en interbase

Hola al foro
delphi 6 + interbase 6 + zeosdbo615stable
- tengo la sgte table en interbase
Create table prueba(codigo integer not null,
nombre varchar(35),
Neto Double precision,
iva computed by (neto * (porc / 100)),
Total Computed by (neto + iva),
primary key(codigo));
- mi problema es el sgte:
- al ejecutar las sgte instrucciones desde delphi
prueba.post;
Prueba.ApplyUpdates;
Prueba.CommitUpdates;
- Emite un error que dice no puede update una columna de solo lectura
- El error se optiene solo si en la tabla utilizo computed by
- como puedo solucionar este problema o tengo que olvidarme de computed by con componentes zeos.

desde ya gracias por la ayuda
atte
jgutti
Responder Con Cita
  #2  
Antiguo 08-02-2005
jgutti jgutti is offline
Miembro
 
Registrado: may 2003
Posts: 189
Poder: 22
jgutti Va por buen camino
he solucionado mi problema modificando el archivo ZDbcInterbase6Metadata.pas
- Esta es la solución:
Release 6.1.5 does not support computed source fields. If such a field is used in a table, all INSERT statements generated by ZQuery and ZTable fail due to the attempt at updating a read-only field (ie the field that has a computed source).

I added a preliminary hack to support it, but it is not yet tested thoroughly. It works for me, though. It would be great if your could add this functionality to the 6.5 build.

I made the following changes:
- ZDbcInterbase6Metadata.pas, lines 1703-1710: the SQL SELECT metadata fetch statement has been augmented with another field: Code:
b.RDB$COMPUTED_SOURCE

- ZDbcInterbase6Metadata.pas, line 1788:
the statement Code:
TargetResultSet.UpdateBooleanByName('WRITABLE', True);
was replaced by Code:
TargetResultSet.UpdateBooleanByName('WRITABLE', (TempResultSet.GetStringByName('RDB$COMPUTED_SOURCE') = ''));

atte
jgutti
Responder Con Cita
Respuesta



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


La franja horaria es GMT +2. Ahora son las 14:34:35.


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
Copyright 1996-2007 Club Delphi