FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
Herramientas | Buscar en Tema | Desplegado |
#1
|
|||
|
|||
Error: " is not a valid integer value
Buenos dias, alguien me puede decir porque me sale un mensaje que dice: -" is not a valid integer value-, el error me lo da cuando tengo vacias unas casillas que me sirven para introducir un tiempo en un campo de tabla de tipo time, pero lo controlo y si estan vacios antes de introducirlo los pongo a 0, porque puede ser?, gracias, aqui os dejo el codigo del boton "agregar":
var a:integer; s:integer; c:integer; begin s:=0; c:=0; almin.ReadOnly:=true; alseg.ReadOnly:=true; alalbums.Active:=true; alalbums.First; if (strtoint(alhora.text)>60) or (strtoint(almin.text)>60) or (strtoint(alseg.text)>60) then begin showmessage('Duraciòn incorrecta'); if strtoint(alhora.text)>60 then begin alhora.Text:=''; end; if strtoint(almin.text)>60 then begin almin.text:=''; end; if strtoint(alseg.text)>60 then begin alseg.text:=''; end; s:=1; end; if alhora.Text='' then begin alhora.Text:='0'; end; if almin.text='' then begin almin.text:='0'; end; if alseg.text='' then begin alseg.Text:='0'; end; for a:=alalbums.recordcount-1 downto 0 do begin if uppercase(alalbums.FieldByName('titulo').AsString)=uppercase(altitulo.text) then begin showmessage('El album ya existe'); s:=1; end; if (c=0) and ((alalanzamiento.text<'1900') or (alalanzamiento.text>'2005')) then begin showmessage('El año es incorrecto'); c:=1; s:=1; end; alalbums.Next; end; if (altitulo.text='') or (algrupo.text='') or (alhora.text='') or (almin.text='') or (alseg.text='') or (alalanzamiento.text='') then begin showmessage('Faltan datos por rellenar'); end; if (s=0) and (altitulo.text<>'') and (algrupo.text<>'') and (alhora.text<>'') and (almin.text<>'') and (alseg.text<>'') and (alalanzamiento.text<>'') then begin alalbums.last; alalbums.Insert; alalbums.FieldByName('titulo').AsString:=altitulo.Text; alalbums.FieldByName('n_canciones').Asstring:=alncanciones.text; alalbums.FieldByName('duracion').Asstring:=alhora.Text+':'+almin.text+':'+alseg.text; alalbums.FieldByName('año_lanzamiento').Asstring:=alalanzamiento.text; alalbums.FieldByName('grupo').AsString:=algrupo.Text; showmessage('Album añadido'); altitulo.text:=''; algrupo.text:=''; alhora.text:=''; almin.Text:=''; alseg.text:=''; alalanzamiento.text:=''; alalbums.Post; alalbums.Active:=false; end; s:=0; a:=0; b:=0; c:=0; d:=0; |
|
|
|