"版本"一个.MDB文件 [英] "Versioning" a .MDB file

查看:107
本文介绍了"版本"一个.MDB文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一位朋友正在开发Access 2003数据库。我正在使用C#Net开发一个简单的

安装程序包。我们正在寻找最好的方法,建议

和明确的代码示例:


1.设置Access的''版本号''类型属性。 MDB / .MDE文件

在Access / VBA中


2.然后如何阅读.MDB / .MDE''''版本号''来自C#.Net


TIA

-Jeff

A friend is developing a Access 2003 database. I am developing a simple
installer package using C#Net. We are looking for best methods, suggestions
and definately code examples for:

1. Setting a ''version number'' type property of the Access .MDB/.MDE file
within Access/VBA

2. Then how to read the.MDB/.MDE''s ''version number'' from C#.Net

TIA
-Jeff

推荐答案

为什么不你只需在桌子上放一个版本号吗?


然后如果你想要的话在VBA方面ThisVersion = DLOOKUP(CURRVER,

" VersionInfo")


-aaron

why dont you just put a version number in a table or something?

then if you want; on the VBA side ThisVersion = DLOOKUP("CURRVER",
"VersionInfo")

-aaron


一个难题怎么样?你如何版本访问xp文件,以便

office xp开发人员打包向导安装程序知道更换旧版本的b $ b版本mdb文件而不是要求用户更换现有文件一个

与安装包中较旧的一个??


< aa ********* @ gmail.com>在消息中写道

news:11 ********************** @ g47g2000cwa.googlegr oups.com ...
how about a hard question? how do you version an access xp file so that the
office xp developer packaging wizard installer knows to replace an older
version mdb file instead of asking the user about replacing an existing one
with an older one from the installation package??

<aa*********@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
为什么你不把一个版本号放在一张桌子或什么东西?

然后如果你想要的话;在VBA方面ThisVersion = DLOOKUP(CURRVER,
VersionInfo)

-aaron
why dont you just put a version number in a table or something?

then if you want; on the VBA side ThisVersion = DLOOKUP("CURRVER",
"VersionInfo")

-aaron



Jeffery Tyree <济*********** @ yahoo.com>在消息中写道

news:Om ************** @ TK2MSFTNGP09.phx.gbl
"Jeffery Tyree" <Je***********@yahoo.com> wrote in message
news:Om**************@TK2MSFTNGP09.phx.gbl
一位朋友正在开发Access 2003数据库。我正在使用C#Net开发一个简单的安装程序包。我们正在寻找最佳的方法,建议和明确的代码示例:

1.设置Access .MDB / .MDE的''版本号''类型属性
Access / VBA中的文件

2.然后如何从C#.Net
A friend is developing a Access 2003 database. I am developing a
simple installer package using C#Net. We are looking for best
methods, suggestions and definately code examples for:

1. Setting a ''version number'' type property of the Access .MDB/.MDE
file within Access/VBA

2. Then how to read the.MDB/.MDE''s ''version number'' from C#.Net

中读取.MDB / .MDE的''版本号''

您可以设置自定义数据库属性,这很容易通过

访问用户界面来完成:文件 - >数据库属性,自定义选项卡。

但是,我知道阅读该属性的唯一方法是使用DAO,而且我不知道这是不是'b $ b选项适合你。


* VBA * DAO代码如下所示:

Dim db作为DAO.Database

Dim sngAppVersion单身


设置db = DBEngine.OpenDatabase(" YourPath \YourDatabase.mdb")

sngVersion =

db.Containers(" Databases")。Documents(" UserDefined").Properties(" AppVersi

on")

>
db.Close


在桌子的记录中使用字段可能更简单,如Aaron

Kempf建议。 br />

-

Dirk Goldgar,MS Access MVP
www.datagnostics.com


(请回复新闻组)



You can set a custom database property, which is very easy to do via the
Access user interface: File -> Database Properties, Custom tab.
However, the only way I know to read that property is with DAO, and I''m
not sure whether that''s an option for you or not.

*VBA* DAO code would look like this:

Dim db As DAO.Database
Dim sngAppVersion As Single

Set db = DBEngine.OpenDatabase("YourPath\YourDatabase.mdb")

sngVersion =
db.Containers("Databases").Documents("UserDefined" ).Properties("AppVersi
on")

db.Close

It may well be simpler to use a field in a record in a table, as Aaron
Kempf suggests.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


这篇关于&QUOT;版本&QUOT;一个.MDB文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆