高手请进:怎样判断*.mdb的版本?

yneversky 2000-09-08 11:13:00
如何判断一个*.mdb文件是由Access 97还是由Access 2000创建的。
我曾经试过GetFileVersionInfo等函数,但是GetLastError总报告“企图以不正确的格式加载程序”;我也考虑象MSDN介绍获取Excel和Word文件版本的办法采用结构化存储机制直接从文件中读,但是苦于不知道*.mdb的格式。恳请高手教我!
...全文
276 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
yneversky 2000-09-08
  • 打赏
  • 举报
回复
inforever:不能从 ProductVersion中取得吗?
iforever 2000-09-08
  • 打赏
  • 举报
回复


正常来说,只要是WINDOWS下的文件, 都可以用这个涵数取的版本,

问题是你访问的是"文件"吗.

但: GetFileVersionInfo这个函数取的版本并不是你要的版本.
蒋晟 2000-09-08
  • 打赏
  • 举报
回复
CDaoDatabase::GetVersion
CString GetVersion( );
throw( CDaoException, CMemoryException );

Return Value

A CString that indicates the version of the database file associated with the object.

Remarks

Call this member function to determine the version of the Microsoft Jet database file. The value returned represents the version number in the form “major.minor”; for example, “3.0”. The product version number (for example, 3.0) consists of the version number (3), a period, and the release number (0). The versions to date are 1.0, 1.1, 2.0, and 3.0.

For more information about database objects, see the articleDAO Database in Visual C++ Programmer's Guide. For related information, see the topic "Version Property" in DAO Help
yneversky 2000-09-08
  • 打赏
  • 举报
回复
?

16,471

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧