Ver Mensaje Individual
  #1  
Antiguo 14-10-2008
che che is offline
Registrado
 
Registrado: may 2008
Ubicación: Moquegua - Perú
Posts: 9
Reputación: 0
che Va por buen camino
Error en type conversion

Saludos Delphines, tengo un problema con mi codigo, es para buscar registros de un tabla, si funciona cuando estan todos los campos, pero si falta un campo me bota error en type de conversion:
****MENSAJE*****
Project Bitacora.exe raised exception class EvariantError with message 'Invalid variant type conversion'.
Process stopped. Use Step or Run to continue


Este es mi codigo:
procedure TForm3.Edit3KeyPress(Sender: TObject; var Key: Char);
var
k,c:integer;
m:string;
begin
if key=#13 then
begin
table1.Refresh;
k:=0;
table1.Last;
while not table1.Bof do
begin
if edit3.Text = table1['Cod_modelo_impre'] then
begin
k:=1;
edit1.Text := table1['Cod_modelo_impre'];
edit4.Text := table1['Cod_marca_impre'];
edit2.Text := table1['Modelo_impre'];
edit5.Text := table1['serie_impre'];
break;
end
else
table1.Prior;
end;

El sistema es Delphi 6 con access 2007, cuando usa la base de datos Paradox no me salia este error. Gracias de antemano por cualquier ayuda.
Responder Con Cita