473,387 Members | 1,897 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

"Versioning" a .MDB file

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
Oct 14 '05 #1
14 3003
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

Oct 14 '05 #2
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...
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

Oct 14 '05 #3
"Jeffery Tyree" <Je***********@yahoo.com> wrote in message
news:Om**************@TK2MSFTNGP09.phx.gbl
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


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)
Oct 14 '05 #4
Thank you for the suggestion Aaron. However, I would like to avoid database
access by the installer.

It will be the installer application (C#Net) that will be concerned with
reading the .MDB/.MDE version number and then decide what type of
install/upgrade to do based on the version number. Preferably we would
like to use the properties or something similar like you see on the
'Version' tab when you do a 'Properties' select on an .EXE file from the OS
side but this tab does not seem to be available when doing a 'Properties'
select on a .MDB/.MBE file.

-Jeff
<aa*********@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
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

Oct 14 '05 #5
can't you just put a version number in the file name?

I just personally can't stand the package and deployment wizard.. i
mean for starters-- its' total overkill for a simple app via the Access
runtime

i'd just reccomend storing it in the database. and pulling it out.

if your c# SHIT can't pull a value out of a database; then why dont you
just write an MDB to help you with deployment?

i mean seriously.

Why dont you just use a MDB instead of PND and C# and all this other
crap. i mean-- all you're doing is pushing a file from one location to
another.. right?

Oct 14 '05 #6
My database starter has a versioning module in it. Just open it, and copy
the routines:

http://www.datastrat.com/Download/Starter.zip
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

"Jeffery Tyree" <Je***********@yahoo.com> wrote in message
news:Om**************@TK2MSFTNGP09.phx.gbl...
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

Oct 15 '05 #7
does that work with the packaging wizard's installer to properly identify
the revision of the mdb to avoid asking the user which one to use??

"Arvin Meyer [MVP]" <a@m.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
My database starter has a versioning module in it. Just open it, and copy
the routines:

http://www.datastrat.com/Download/Starter.zip
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

"Jeffery Tyree" <Je***********@yahoo.com> wrote in message
news:Om**************@TK2MSFTNGP09.phx.gbl...
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


Oct 15 '05 #8
Jeffery:

Please don't cross-post all over the place.

--
Gary L. Chefetz, MVP
"We wrote the books on Project Server"
http://www.msprojectexperts.com

For Project Server FAQs visit
http://www.projectserverexperts.com

For Project FAQs visit
http://www.mvps.org/project
"Jeffery Tyree" <Je***********@yahoo.com> wrote in message
news:Om**************@TK2MSFTNGP09.phx.gbl...
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

Oct 16 '05 #9
I would use custom properties on the db object

I'm not 100% sure how it works in ADO, but in DAO it work fine....

Use the CreateProperty function on the open database to once and for all
create your custom property, for example a string value.

After that you can read and write to the property just by assigning new
values to it, of course you'll need to open the db object, but you do not
need to open any table.
for ex.
DB.properties("YourPropName").Values = "56589"
if clng(DB.properties("YourPropName").values) > 50000 then ....
Kjell

"Jeffery Tyree" wrote:
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

Oct 16 '05 #10
It creates a custom property named "Version" and fills the value. The other
code allows reading the version property and changing the version property
to a different value. The rest of the app deals with downloading a copy from
the server if the version is different than the one on the workstation.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

"Dave" <no***@nowhere.com> wrote in message
news:Vu********************@crocker.com...
does that work with the packaging wizard's installer to properly identify
the revision of the mdb to avoid asking the user which one to use??

"Arvin Meyer [MVP]" <a@m.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
My database starter has a versioning module in it. Just open it, and copy the routines:

http://www.datastrat.com/Download/Starter.zip
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

"Jeffery Tyree" <Je***********@yahoo.com> wrote in message
news:Om**************@TK2MSFTNGP09.phx.gbl...
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



Oct 17 '05 #11
sorry, i don't have that luxury. this must be delivered on a cd for
installation. but the way the installer included by the packaging wizard
works it apparently only checks the modified date, which if the user has
been using their copy can be later than the date on a newer version file
being delivered... this of course causes the installer to ask if they want
to replace their 'newer' file with an 'older' one from the installation,
which is of course confusing. so, the question remains i guess... is there
some way to set the version in an mdb file so the packaging wizard's
installer knows the revision so it doesn't ask the user about replacing the
file?

"Arvin Meyer [MVP]" <a@m.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
It creates a custom property named "Version" and fills the value. The
other
code allows reading the version property and changing the version property
to a different value. The rest of the app deals with downloading a copy
from
the server if the version is different than the one on the workstation.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

"Dave" <no***@nowhere.com> wrote in message
news:Vu********************@crocker.com...
does that work with the packaging wizard's installer to properly identify
the revision of the mdb to avoid asking the user which one to use??

"Arvin Meyer [MVP]" <a@m.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
> My database starter has a versioning module in it. Just open it, and copy > the routines:
>
> http://www.datastrat.com/Download/Starter.zip
> --
> Arvin Meyer, MCP, MVP
> Microsoft Access
> Free Access downloads:
> http://www.datastrat.com
> http://www.mvps.org/access
>
> "Jeffery Tyree" <Je***********@yahoo.com> wrote in message
> news:Om**************@TK2MSFTNGP09.phx.gbl...
>> 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
>>
>>
>
>



Oct 17 '05 #12
> but the way the installer included by the packaging wizard works it
apparently only checks the modified date,
Really? I thought the XP packaging wizard checked the version number on the
3rd screen ("Application Information") of the packaging wizard. I guess I've
just been incredibly lucky. (I'm not being sarcastic, i really mean I guess
I've been incredibly lucky)

--
George Nicholson

Remove 'Junk' from return address.
"Dave" <no***@nowhere.com> wrote in message
news:d5********************@crocker.com... sorry, i don't have that luxury. this must be delivered on a cd for
installation. but the way the installer included by the packaging wizard
works it apparently only checks the modified date, which if the user has
been using their copy can be later than the date on a newer version file
being delivered... this of course causes the installer to ask if they want
to replace their 'newer' file with an 'older' one from the installation,
which is of course confusing. so, the question remains i guess... is
there some way to set the version in an mdb file so the packaging wizard's
installer knows the revision so it doesn't ask the user about replacing
the file?

"Arvin Meyer [MVP]" <a@m.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
It creates a custom property named "Version" and fills the value. The
other
code allows reading the version property and changing the version
property
to a different value. The rest of the app deals with downloading a copy
from
the server if the version is different than the one on the workstation.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

"Dave" <no***@nowhere.com> wrote in message
news:Vu********************@crocker.com...
does that work with the packaging wizard's installer to properly
identify
the revision of the mdb to avoid asking the user which one to use??

"Arvin Meyer [MVP]" <a@m.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
> My database starter has a versioning module in it. Just open it, and

copy
> the routines:
>
> http://www.datastrat.com/Download/Starter.zip
> --
> Arvin Meyer, MCP, MVP
> Microsoft Access
> Free Access downloads:
> http://www.datastrat.com
> http://www.mvps.org/access
>
> "Jeffery Tyree" <Je***********@yahoo.com> wrote in message
> news:Om**************@TK2MSFTNGP09.phx.gbl...
>> 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
>>
>>
>
>



Oct 17 '05 #13
ok.

well tony; you can keep on using your crap code if you want. I will
give you permssion.

but dont you think that it would be EASIER to not have to update
frontends every 30 seconds?

i mean-- everytime you change a query you need to update a frontend?

keeping everything in one place is much easier and higher performance

ADP against MSDE is the same price as MDB.

Nov 7 '05 #14
"aa*********@gmail.com" <aa*********@gmail.com> wrote:
but dont you think that it would be EASIER to not have to update
frontends every 30 seconds?

i mean-- everytime you change a query you need to update a frontend?
Big deal. Every time a query changes a form, report or module is also changed and
everything needs to be update.
keeping everything in one place is much easier and higher performance
Umm, you mean two places don't you. The ADP still contains the forms, reports and
modules doesn't it?
ADP against MSDE is the same price as MDB.


Sure, but ADPs and SQL Server/MSDE are signficantly more inconvenient and a higher
learning curve.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 8 '05 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Jeffery Tyree | last post by:
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.