Ver Mensaje Individual
  #2  
Antiguo 03-09-2021
Avatar de Casimiro Notevi
Casimiro Notevi Casimiro Notevi is offline
Moderador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.057
Reputación: 10
Casimiro Notevi Tiene un aura espectacularCasimiro Notevi Tiene un aura espectacular
Hola, no olvides usar las etiquetas cuando pongas código, ejemplo:

En cuanto a tu código, aparte de que no sé para qué poner a null un campo, hay un par de errores a simple vista:
Código Delphi [-]
SQL.Add('fecha_nacimiento =
Falta el set
Código Delphi [-]
SQL.Add('set fecha_nacimiento =
Y lo otro es esto:
Código Delphi [-]
if (DatetimePicker1.Format <> '') then FDQuery.ParamByName('fecha_nacimiento').IsNull
else FDQuery.ParamByName('fecha_nacimiento').AsDate := DatetimePicker1.Date;
No tiene una sintaxis correcta, si format<>'' then fecha_nacimiento.AsDate := null // por ejemplo.
O también:
Código Delphi [-]
if (DatetimePicker1.Format <> '') and FDQuery.ParamByName('fecha_nacimiento').IsNull
then FDQuery.ParamByName('fecha_nacimiento').AsDate := DatetimePicker1.Date;
Realmente no se sabe qué quieres hacer ahí.
Responder Con Cita