![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Buscar | Temas de Hoy | Marcar Foros Como Leídos |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#7
|
|||
|
|||
|
Gracias Delphius muy amable de hecho si me dieron la guia peroooo no tengo chansilla de leerla, eje...
Bueno mira estoy trabajando con interbase en monousuario y en los eventos de las tablas tengo lo siguiente: tabla del encabezado After Post if (datos.TBLORDENCOMPRA.State=DsEdit) then begin datos.TBLORDENCOMPRASUBTOTAL.Value:=datos.TBLORDENCOMPRASUBTOTAL.Value+importe; datos.TBLORDENCOMPRATOTAL.value:=datos.TBLORDENCOMPRASUBTOTAL.value*0.15; datos.TBLORDENCOMPRA.post; datos.TBLORDENCOMPRA.refresh; end; // calculo importes y totales OnnewRecord cont:=0; renglones:=1; datos.TBLORDENCOMPRASUBTOTAL.Value:=0; datos.TBLORDENCOMPRATOTAL.Value:=0; importe:=0; //inicializo variables en la tabla de detalles.... After post ren:=datos.tordenDetallesNDETALLES.value; DATOS.TBLFOLIOS.Edit; datos.TBLFOLIOSFOLIO.Value:=ren; DATOS.TBLFOLIOS.Post; datos.TBLFOLIOS.Refresh; cont:=cont+1; // tengo el contador para el control de los renglones del dbgrid, ke por cierto sale un error medio extraño aqui. Ademas de controlo los folios Before Post if cont=6 then begin datos.tordenDetalles.cancel; error(); end else if (datos.tordenDetalles.State=dsinsert)then begin datos.tordenDetallesIMPORTE.value:=datos.tordenDetallesCANTIDAD.value*datos.tordenDetallesPU.Value; importe:=datos.tordenDetallesIMPORTE.value; renglones:=renglones+1; datos.TBLORDENCOMPRA.Edit; datos.TBLORDENCOMPRASUBTOTAL.value:=datos.tordenDetallesIMPORTE.Value+datos.TBLORDENCOMPRASUBTOTAL.v alue; datos.TBLORDENCOMPRAIVA.value:=datos.TBLORDENCOMPRASUBTOTAL.Value*0.15; datos.TBLORDENCOMPRATOTAL.Value:=datos.TBLORDENCOMPRASUBTOTAL.value+datos.TBLORDENCOMPRAIVA.value; end; y fnalmente OnNewRecord if (datos.tordenDetalles.eof) then begin datos.tordenDetallesRENGLONES.Value:=renglones; ren:=datos.TBLFOLIOSFOLIO.VALUE; datos.tordenDetallesNDETALLES.value:=ren+1; datos.REL_UN_OCNORDEN.Value:=datos.TBLORDENCOMPRANORDEN.Value; datos.REL_EMP_OCNORDEN.Value:=datos.TBLORDENCOMPRANORDEN.Value; datos.REL_UN_OCNRENGLON.Value:=renglones; datos.REL_EMP_OCNCARgo.Value:=renglones; end; if ((datos.tordenDetallesCANTIDAD.value=0)or (datos.tordenDetallesCANTIDAD.IsNull=true))then begin datos.tordenDetallesCANTIDAD.value:=1; end; if ((datos.tordenDetallesPU.value=0)or(datos.tordenDetallesPU.IsNull=true))then begin datos.tordenDetallesPU.Value:=1; end; y el error ke me sale al tratar de modificar uno de los renglones del dbgrid ke esta relacionado con la tabla detalles es: Proyect LAPIMI.exe raised Exception class EDataBaseError with message 'Tordendetalles: Dataset not in Edit or Insert mode' |
| Herramientas | Buscar en Tema |
| Desplegado | |
|
|
Temas Similares
|
||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| conectarse a una base de datos a traves de internet | andressanchez | Firebird e Interbase | 3 | 28-12-2006 10:07:09 |
| bases de datos a través de la red | royrogers84 | Varios | 1 | 01-12-2006 17:32:09 |
| Leer datos a traves del COM1 | Sr.Scorpion | Varios | 2 | 31-05-2005 19:47:25 |
| ¿Como puedo mandar Datos a traves del Socket? | juliopag1 | Internet | 1 | 23-04-2004 14:44:05 |
| Capturar datos que llegan a traves de cable de red | txeka | Varios | 3 | 26-08-2003 18:30:48 |
|