Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deploying Access Projects 3

Status
Not open for further replies.

Bensta

Programmer
Jul 21, 2003
122
US
I have to questions on adp files. What would be the best way to deploy/distribute an adp file to users in a networked environement while maintaining a good speed performance of the application?
I also noticed that if one user has an adp file open and anoter user tries to open the same adp file, he or she will get a warning message that the file will be open in read-only mode. I guess access sets the file in exclusive mode by default.
How can I go about removing that annoying warning? Is there a way around it?
I will appreciate any help.
Thank you in advance
 
Hope the following Microsoft Knowledgebase copies help...

Bob

318868-ACC2002: "The Database Will Be Opened Read-Only" Error Message When Users Try to Open a Project or Extension File in a Multiuser Environment
The information in this article applies to: Microsoft Access 2002

This article was previously published under Q318868
This article applies only to a Microsoft Access project (.adp).

Moderate: Requires basic macro, coding, and interoperability skills.

For a Microsoft Access 2000 version of this article, see 322762.

SYMPTOMS
When users in a multiuser environment try to open a Microsoft Access project (.adp) file or a Microsoft Access project extension (.ade) file, they may receive an error message similar to the following:

The database DatabaseName will be opened read-only because one of the following occurred: The file is locked for editing by another user, or the file (or the folder in which it is located) is marked as read-only, or you specified that you wanted to open this file read-only.

CAUSE
This behavior is by design. An Access project is strictly a client and has no multiuser capability.

RESOLUTION
To resolve this issue, deploy a copy of the .adp file or .ade file to each computer.

For information about how to deploy Microsoft Access project solutions, browse to the following MSDN articles:
Developing Client/Server Solutions with Microsoft Access 2000 Projects

Creating and Deploying Access Solutions with the Microsoft Data Engine

-------------------------------------------------------

322762-ACC2000: "The Database Will Be Opened Read-Only" Error Message When Users Try to Open a Project or Extension File in a Multiuser Environment
The information in this article applies to: Microsoft Access 2000

This article was previously published under Q322762
This article applies only to a Microsoft Access project (.adp).

Moderate: Requires basic macro, coding, and interoperability skills.

For a Microsoft Access 2002 version of this article, see 318868.

SYMPTOMS
When users in a multiuser environment try to open a Microsoft Access project (.adp) file or a Microsoft Access project extension (.ade) file, they may receive an error message similar to the following:

The database DatabaseName will be opened read-only because one of the following occurred: The file is locked for editing by another user, or the file (or the folder in which it is located) is marked as read-only, or you specified that you wanted to open this file read-only.

CAUSE
This behavior is by design. An Access project is strictly a client and has no multiuser capability.

RESOLUTION
To resolve this issue, deploy a copy of the .adp file or .ade file to each computer.

For information about how to deploy Microsoft Access project solutions, browse to the following MSDN articles:
Developing Client/Server Solutions with Microsoft Access 2000 Projects

Creating and Deploying Access Solutions with the Microsoft Data Engine
 
Thank you very much for your help.
The resource is very helpfull.
Thanks again
 
Hi,
I have an adp which I distribute around the office by the use of a batch file..

Like the following..
1. make a batch file like this on your server

Update.bat
------------------------------------------------------
rem make the directories (no harm if they're already there)
c:
cdcd "Program Files"
mkdir "OrderEntry Database"
cd "OrderEntry Database"

rem If the latest version file is on the PC, just start the database
if exist "OrderEntry_Database.1.24.txt" goto Startup

copy "\\ServerName\Databases\webImport\Orders.lnk"
copy "Orders.lnk" "C:\Documents and Settings\All Users\Start Menu\Orders.lnk"
copy "Orders.lnk" "C:\Documents and Settings\All Users\Desktop\Orders.lnk"

rem Copy a new front end
copy "\\ServerName\Databases\webImport\Orders.adp"
copy "\\ServerName\Databases\webImport\OrderEntry_Database.1.24.txt"
copy "\\ServerName\Databases\webImport\dll\ImportSpec\SpecDB.mdb"
copy "\\ServerName\Databases\webImport\dll\ImportSpec\TsiImpExp100.mde"

:Startup
rem fire it up
"C:\Program Files\Microsoft Office\Office10\msaccess.exe" "c:\Program Files\OrderEntry Database\orders.adp"

exit
---------------------------------------

2. make an empty text file like OrderEntry_Database.1.24.txt
Place this on the server also.

3. Make a Shortcut that points to the batch File.

Copy this shortcut to the local computer and run it.


What Happens.

1. The shortcust executes the batch file.
The batch file check if the file OrderEntry_Database.1.24.txt exists on the server. If it does, it copies down the other files to the local server. Then executes the adp file.

The beauty of this is that you can work locally on you dev version, then when your ready to update your live version, all you do is
Update the batch file with the new file name like

OrderEntry_Database.1.24.txt to
OrderEntry_Database.1.25.txt

and then change the file named OrderEntry_Database.1.24.txt to OrderEntry_Database.1.25.txt




 
opps.

There is also other threads relating to batch files being used to update local versions.

I got this from another post here so have a look around!!

enjoy
 
bbrendan

"There is also other threads relating to batch files being used to update local versions"

I would like to see this - Where?
 
bbrendan,

A nice simple and effective way of doing it.

Cheers,


Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
(dont cut corners or you'll go round in circles)
 
It looks like this was taken from an old version of my website. Please, if you're going to use someone else's code, acknowledge where you got it. It's only polite. And, in fact, it may be only legal. I'm more concerned with the polite part, than the legal part.

For a newer version of the way I update front ends, you can go to the Developers' section of my website and click on "Deploying Databases".

Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Access Databases for Non-Profit Organizations

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Hi Jeremy,

my appologies, I should have added this to the orginal tip.

brendan
 
Brendan,

Not a big deal. I did want to make sure to point it out to you though. When I take code from others (and I do it all the time), I make sure to put a credit line in my own code, so that whenever I copy and paste that code into some other routine (or forum), the original author's name will always be there.

Incidentally, I also try to have my own name in all of my code, to make that job easier for others who use my code, and I noticed that I didn't do this in my batch file code. I'll take care of that now--thanks for pointing this out to me!

Take care.

Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Access Databases for Non-Profit Organizations

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Jeremy,
I like your solution but wondered if you have a way to get rid of the old text files that keep track of the version when a new text file get installed.
Sue
 
Sue,

Thanks. I'm glad the solution is of some value to you.

I actually like keeping them on the user machines, as it paints a nice picture of what versions the user has used.

On the other hand, I'm sure it wouldn't be that difficult to write a couple of lines of code that delete all the version files on the user's machine immediately before copying the new one over there.

On the third hand, I don't know what those lines of code would be, off hand.

Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Access Databases for Non-Profit Organizations

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Sue,

Part of Alphabet City's solution is:

rem Copy a new front end if the newest version file is not present
if not exist "BrXpVersion.1.0.txt" copy "t:\BrXpFE.mde"
if not exist "BrXpVersion.1.0.txt" copy "t:\BrXpVersion.1.0.txt"


After "rem..." and before the first "if not exist..."
insert:
del BrXpVersion*.txt > nul

I would personally leave the text files in place.
My users generally don't wander around the network,
instead starting their applications using shortcuts.

And, as stations are added, keeping the version files
provides information on their history. It's easier
if each application is in its own folder.

HTH,
Bob [morning]
 
How about deploying an ADP using terminal services? Since an ADP does not work in a mult-user environment, I thought I could place a copy in each user's profile on the terminal server. Is there syntax for the script that would capture the user's login - so it would be something like c:\documents and settings\username\my documents for the path? I would appreciate any other suggestions on how to deploy an ADP in a terminal server environment and have the ability to easily update versions.
 
I Like rr191 solution from DB Journal.

Im not sure about a script for term services, but im sure you could just fire up the script based on DB journal on startup.

If you know Term services, you shuld be able to just run the ADP project only, and not the whole desktop.

Also a not. term services is not cheap to run (licenses), so it may also be a factor

cheers
 
If you wanted to do this terminal server thing, I guess you could with the NT user name and Domain name from the Active DS Type Library.

You can get all the NT authentication information via Active DS Type Library. I use this to find full usernames and set visibility and access by what domain groups users belong to. I am already creating users in my SQL db ADP project. I am thinking that I will just crate a column for user version. Maybe I will store messages and versions in a new table. So you can tell the user what’s in the upgrade.

You can find many examples under, “Active DS Type Library”.
 
Okay...Begginner here. I am trying to write the batch file. Where do I write it at? Just create a notepad file and save as a bat? I tried creating a test batch file just to see if I could get a batch file to create a directory for me. So the contents of the bat file were thus:

c:
cd\
cd "Program Files"
mkdir "OrderEntryDatabase"



but when I go to check to see if the directory has been created its not there.


Is there a beginning or ending that I am leaving out?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top