怎样编程区分access97和access2000文件

    技术2022-05-11  132

    说明:

    经本人用uledit研究access2000格式mdb文件从9c开始的三个字节为"4.0",97则无,用delphi编写的函数如下:

    function isaccess2000(filepath:string):boolean;

    //判断文件是否为access2000格式,shirong21cn@163.comconst    veraddr=$9c;var    strbuf:array[0..2]of byte;    f:tfilestream;    i:integer;    p:pchar;begin    f:=TFileStream.Create(FilePath,fmShareDenyNone);    try      F.Seek(veraddr,soFromBeginning);      F.Read(strBuf,3);      p:=@strbuf;      if p='4.0' then result:=true          else result:=false;    finally      f.free;    end;

    怎么没人反映意见?我删了它!

    end;


    最新回复(0)