Ver Mensaje Individual
  #7  
Antiguo 08-11-2022
steelha steelha is offline
Miembro
 
Registrado: mar 2012
Posts: 158
Reputación: 13
steelha Va por buen camino
Código Delphi [-]
  if nuevo = 1 then
    begin
      DM.QryPacientes.Insert;
      DM.QryPacientesidpaciente.Value := DM.QryPacientes.RecordCount + 1;
    end
  else
    DM.QryPacientes.Edit ;

  with DM do
  begin
    QryPacientespxNombres.Value   := Trim(edtnombre.Text);
    QryPacientespxApellidos.Value := Trim(edtapellido.Text);
    QryPacientespxDocumento.Value := Trim(edtdocumento.Text);
    QryPacientespxCorreo.Value    := Trim(edtdocumento.Text);
    QryPacientespxDireccion.Value := Trim(mdireccion.Lines.Text);
    QryPacientespxTelefonos.Value := Trim(mtelefono.Lines.Text);
    QryPacientespxEstado.Value    := chkactivo.Checked;
    QryPacientesidSexo.Value      := QrySexoidSexo.Value;
    QryPacientesidEstadoCivil.Value:=QryECidEstadoCivil.Value;
    QryPacientesidZona.Value      := QryZonaidZona.Value;
    QryPacientesidCiudad.Value    := QryCiudadidCiudad.Value;
    QryPacientesidSector.Value    := QrySectoridSector.Value;
    QryPacientesidSeguro.Value         := QryArsidArs.Value;
    QryPacientespxNacidoen.AsDateTime  := dtpnacimiento.DateTime;
    QryPacientes.Post;
  end;

He probado los cambios y todo perfecto siempre y cuando no cambie la fecha. Desde que selecciona una fecha he intento grabar obtengo el error.

First chance exception at $7640DF72. Exception class EDatabaseError with message 'Conversion failed when converting date and/or time from character string'.
Responder Con Cita