Es solo una pregunta antes de estropear algo
Si en una tabla inserto un registro en blanco, pero no hago
post, afectará al fichero de índices?
Ejemplo: (el objeto TDbf pertenece al Form)
Código Delphi
[-]
procedure TForm1.PasarGridViewToTablas( strTabla:string );
var
ColorCelda : TColor;
DatosCelda : string;
ACol, ARow : integer;
strClave : string;
intUnix : integer;
strFecha : string;
Y, M, D : word;
begin
with Dbf do begin
Active := false;
IndexName := strTabla;
TableName := strTabla + '.dbf';
Open;
for ARow:=0 to GridView1.RowCount-1 do begin
Application.ProcessMessages;
strClave := GridView1.Cell[0, ARow].AsString;
intUnix := StrToInt( GridView1.Cell[1, ARow].AsString );
strFecha := GridView1.Cell[2, ARow].AsString;
Y := StrToIntDef( Copy(strFecha, 7, 4), 1970 );
M := StrToIntDef( Copy(strFecha, 4, 2), 12 );
D := StrToIntDef( Copy(strFecha, 1, 2), 1 );
if not SearchKey(strClave, stEqual) then begin
Append;
FieldByName('ESTACION').AsString := strClave;
FieldByName('FECHA_UNIX').AsInteger := 0;
end else Edit;
if( intUnix>=FieldByName('FECHA_UNIX').AsInteger ) then Continue;
...
Post;
end;
Close;
end;
end;
con Delphi-7 y TDbf