머리글에 자동 열기 (.MDX) 인덱스 플래그가 있지만 인덱스가 데이터베이스에없는 것 같습니다.
시도해 볼 수 있습니다. 데이터베이스 헤더에서 해당 autoopen 플래그를 지 웁니다. 데이터베이스 복사본을 테스트하십시오! DBase IV에서 테스트하지는 않았지만 FoxPro 및 DBase의 여러 가지 버전에서 작동합니다.
procedure FixDBFHeader(const FileName: string);
var
ByteRead: Byte;
Stream: TFileStream;
begin
Stream := TFileStream.Create(FileName, fmOpenReadWrite or fmShareDenyNone);
try
// Byte offset 28 has a value of 0x01 if a structural (auto-open) index exists,
// or 0x00 if no such index exists. If the value is not set, we do nothing.
Stream.Position := 28;
Stream.Read(ByteRead, SizeOf(ByteRead));
if ByteRead = 1 then
begin
ByteRead := 0;
Stream.Position := 28;
Stream.Write(ByteRead, SizeOf(Byte));
end;
finally
Stream.Free;
end;
end;
헤더에 그 깃발을 제거한 후, 당신은 ADO 또는 Advantage Database Server으로 .DBF을 열 수 있어야합니다 - 로컬 서버는 무료이며, SQL을 지원합니다. 나는 Advantage와 어떤 식 으로든 관련이 없다는 것을 알아 두십시오. 방금 전 제품을 사용하여 오랫동안 레거시 DBF 파일을 사용했습니다.
저는 더 이상 사용되지 않지만 BDE를 사용하여 열어 보았습니까? –