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); FormPadre.dDetallePrestamoDIAS_PRESTAMO.Value:= StrToInt(dias.Text);
FormPadre.dDetallePrestamoFECHA_DEVOLUCION.Value:= devolucion.Date;
FormPadre.dDetallePrestamo.Append;
FormPadre.dDetallePrestamo.Post;
close;
end;
end;