Ver Mensaje Individual
  #3  
Antiguo 09-03-2014
mantraxer21 mantraxer21 is offline
Miembro
 
Registrado: ago 2010
Posts: 94
Reputación: 14
mantraxer21 Va por buen camino
ecfisa, muchas gracias.

El tema es que en la grilla Padre, estoy recibiendo muy bien sólo 2 de los 3 registros.

IDMaterial (No recibido)
Numero_dias_prestamo (recibido ok)
Fecha_fevolucion (recibido ok)

Al momento de hacer click en el botón "aceptar" del Formulario "Buscar" ( para enviar los datos a la Grilla del Formulario Padre), me muestra este siguiente error.

Código Delphi [-]
IDDetallePrestamo Must have a value

El Campo IDDetallePrestamo corresponde a la PK de la Tabla Detalle_Prestamo, en la BD es de tipo Obligatorio, Autoincrementable y PK.

Muestro código completo al momento de hacer click en el botón "Aceptar".

Código Delphi [-]
procedure TFormBuscaLibro.btnAceptar(Sender: TObject);
begin
with FormPadre.GrillaPrestamos.DataSource.DataSet do   begin
  FormPadre.dDetallePrestamo.Open;
  FormPadre.dDetallePrestamoIDDETALLEPRESTAMO.Value:= StrToInt(label7.Caption); // aca me muestra el ID según el Generador
  FormPadre.dDetallePrestamoDIAS_PRESTAMO.Value:= StrToInt(dias.Text);
  FormPadre.dDetallePrestamoFECHA_DEVOLUCION.Value:= devolucion.Date;
  FormPadre.dDetallePrestamo.Append;
  FormPadre.dDetallePrestamo.Post;
  close;
end;

end;
Responder Con Cita