设为首页
加入收藏夹

怎样编程区分access97和access2000文件
浏览选项:

说明:



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



function isaccess2000(filepath:string):boolean;



//判断文件是否为access2000格式,shirong21cn@163.com
const
    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;


Copyright © 2004 wanxu.com All Rights Reserved