G
Guest
This is a real bugger. Can someone help me????
I have posted several times trying to get help with attaching a database to
a mdw file. I have read the microsoft information and I seem to be doing
everything correctly. I have tried both a batch file and the easy updater.
I can attach the security file through a shortcut using the following code
"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "D:\Program
Files\PC\PCtrlA.mdb" /WRKGRP "K:\PositionControl\ReadOnly\Sec\pcsec.mdw"
But I use the same configuration in a batch file and it does not work.
It goes all the way through the procedure, but then it tells me I do not
have permission to use the database. The same security file works in the
shortcut above. What's wrong?
Any ideas? Below is the batch file, and I have used it taking out all of the
variables which you see in the bottom version, as well as as this version:
REM A batch file to update a MS Access database then run it under a secure
workgroup
REM by Keith Harvey 09/2000 - (e-mail address removed)
REM **** USER ACCEPTS ALL RISKS WHEN USING THIS BATCH FILE ****
REM **** STOP MESSAGES, CLEAR SCREEN, KEEP USER INFORMED ****
ECHO off
CLS
ECHO.
ECHO Starting Your Front End. Should only take a few seconds
ECHO.
REM Note that the variables and the batch file name MUST be customised for
each database
REM ***** ABOUT THE VARIABLES ******.
REM PGRM is the variable for the file name of your current Front_End.mdb.
REM When updating the version of the Front End simply change PGRM and resave
the batch file
REM (Note: PGRM must also fit the LOCDEL naming pattern below so old
versions delete OK.)
REM LOCDIR is the directory on the Client PC that will hold the working
version of PGRM
REM LOCDEL is the pattern of files to delete in LOCDIR if the latest version
REM of PGRM can't be found (Note that the value of LOCDEL is case sensitive)
REM (Vital Note: TRIPLE CHECK the items you assign to LOCDIR and LOCDEL.
Delete is
REM VERY unforgiving. NEVER EVER set LOCDIR to just C: or LOCDEL to *.*)
REM MSACC is the dos path to MS Access on the local PC.
REM SRVDIR is the directory on the Server to get the latest version of PGRM
from.
REM WKGRP is the location of the access secure workgroup to use. (Note.
Leave WKGRP blank
REM if you are using the standard MSAccess work group)
REM ***** THE VARIABLES *****
set PGRM=PCtrlA.mdb
set LOCDIR="D:\Program Files\PC"
set LOCDEL=PCtrl*.mdb
set MSACC="C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.exe"
set SRVDIR="K:\PositionControl\ReadOnly\PC"
set WKGRP=/wrkgrp "K:\PositionControl\ReadOnly\Sec\pcsec.mdw"
REM ***** COPY YOUR CURRENT FRONT END TO THE PC CLIENT *****
REM Check if the local directory LOCDIR exist's, if not then create it
REM If current version of PGRM does not exist in LOCDIR then:
REM 1. Keep the customers happy!
REM 2. Delete any old versions of PGRM from LOCDIR,
REM 3. Copy the new version of PGRM to LOCDIR
if not exist %LOCDIR% md %LOCDIR%
pause
if not exist %LOCDIR%\%PGRM% echo Updating to the latest version of %PGRM%
pause
REM if not exist %LOCDIR%\%PGRM% del %LOCDIR%\%LOCDEL%
if not exist %LOCDIR%\%PGRM% copy %SRVDIR%\%PGRM% %LOCDIR%\%PGRM%
REM **** FINALLY, START THE LATEST VERSION OF THE FRONT END ON THE PC ******
START /MAX %MSACC% %LOCDIR%\%PGRM% %WKGRP%
REM **** CLOSE THE MSDOS WINDOW ****
cls
________________________________________________________________________________________
OR
______________________________________________________________________________________
if not exist "D:\Program Files\PC" md "D:\Program Files\PC"
pause
if not exist "D:\Program Files\PC\PCtrlA.mdb" echo Updating to the latest
version of PCtrlA.mdb
pause
if not exist "D:\Program Files\PC\PCtrlA.mdb" copy
"K:\PositionControl\ReadOnly\PC\PCtrlA.mdb" "D:\Program Files\PC\PCtrlA.mdb"
REM **** FINALLY, START THE LATEST VERSION OF THE FRONT END ON THE PC ******
START /MAX "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.exe"
"D:\Program Files\PC\PCtrlA.mdb" /wrkgrp
"K:\PositionControl\ReadOnly\Sec\pcsec.mdw"
REM **** CLOSE THE MSDOS WINDOW ****
cls
I have posted several times trying to get help with attaching a database to
a mdw file. I have read the microsoft information and I seem to be doing
everything correctly. I have tried both a batch file and the easy updater.
I can attach the security file through a shortcut using the following code
"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "D:\Program
Files\PC\PCtrlA.mdb" /WRKGRP "K:\PositionControl\ReadOnly\Sec\pcsec.mdw"
But I use the same configuration in a batch file and it does not work.
It goes all the way through the procedure, but then it tells me I do not
have permission to use the database. The same security file works in the
shortcut above. What's wrong?
Any ideas? Below is the batch file, and I have used it taking out all of the
variables which you see in the bottom version, as well as as this version:
REM A batch file to update a MS Access database then run it under a secure
workgroup
REM by Keith Harvey 09/2000 - (e-mail address removed)
REM **** USER ACCEPTS ALL RISKS WHEN USING THIS BATCH FILE ****
REM **** STOP MESSAGES, CLEAR SCREEN, KEEP USER INFORMED ****
ECHO off
CLS
ECHO.
ECHO Starting Your Front End. Should only take a few seconds
ECHO.
REM Note that the variables and the batch file name MUST be customised for
each database
REM ***** ABOUT THE VARIABLES ******.
REM PGRM is the variable for the file name of your current Front_End.mdb.
REM When updating the version of the Front End simply change PGRM and resave
the batch file
REM (Note: PGRM must also fit the LOCDEL naming pattern below so old
versions delete OK.)
REM LOCDIR is the directory on the Client PC that will hold the working
version of PGRM
REM LOCDEL is the pattern of files to delete in LOCDIR if the latest version
REM of PGRM can't be found (Note that the value of LOCDEL is case sensitive)
REM (Vital Note: TRIPLE CHECK the items you assign to LOCDIR and LOCDEL.
Delete is
REM VERY unforgiving. NEVER EVER set LOCDIR to just C: or LOCDEL to *.*)
REM MSACC is the dos path to MS Access on the local PC.
REM SRVDIR is the directory on the Server to get the latest version of PGRM
from.
REM WKGRP is the location of the access secure workgroup to use. (Note.
Leave WKGRP blank
REM if you are using the standard MSAccess work group)
REM ***** THE VARIABLES *****
set PGRM=PCtrlA.mdb
set LOCDIR="D:\Program Files\PC"
set LOCDEL=PCtrl*.mdb
set MSACC="C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.exe"
set SRVDIR="K:\PositionControl\ReadOnly\PC"
set WKGRP=/wrkgrp "K:\PositionControl\ReadOnly\Sec\pcsec.mdw"
REM ***** COPY YOUR CURRENT FRONT END TO THE PC CLIENT *****
REM Check if the local directory LOCDIR exist's, if not then create it
REM If current version of PGRM does not exist in LOCDIR then:
REM 1. Keep the customers happy!
REM 2. Delete any old versions of PGRM from LOCDIR,
REM 3. Copy the new version of PGRM to LOCDIR
if not exist %LOCDIR% md %LOCDIR%
pause
if not exist %LOCDIR%\%PGRM% echo Updating to the latest version of %PGRM%
pause
REM if not exist %LOCDIR%\%PGRM% del %LOCDIR%\%LOCDEL%
if not exist %LOCDIR%\%PGRM% copy %SRVDIR%\%PGRM% %LOCDIR%\%PGRM%
REM **** FINALLY, START THE LATEST VERSION OF THE FRONT END ON THE PC ******
START /MAX %MSACC% %LOCDIR%\%PGRM% %WKGRP%
REM **** CLOSE THE MSDOS WINDOW ****
cls
________________________________________________________________________________________
OR
______________________________________________________________________________________
if not exist "D:\Program Files\PC" md "D:\Program Files\PC"
pause
if not exist "D:\Program Files\PC\PCtrlA.mdb" echo Updating to the latest
version of PCtrlA.mdb
pause
if not exist "D:\Program Files\PC\PCtrlA.mdb" copy
"K:\PositionControl\ReadOnly\PC\PCtrlA.mdb" "D:\Program Files\PC\PCtrlA.mdb"
REM **** FINALLY, START THE LATEST VERSION OF THE FRONT END ON THE PC ******
START /MAX "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.exe"
"D:\Program Files\PC\PCtrlA.mdb" /wrkgrp
"K:\PositionControl\ReadOnly\Sec\pcsec.mdw"
REM **** CLOSE THE MSDOS WINDOW ****
cls