Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 19-02-2005
MiLLeNPuNk MiLLeNPuNk is offline
Registrado
 
Registrado: feb 2005
Posts: 4
Poder: 0
MiLLeNPuNk Va por buen camino
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;
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 12:02:39.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi