Topic: Tab-Text Import, and Queries not working

Hello,

I am looking at a copy of MapMate currently installed on a Windows 7 laptop, owned by one of our partners.
The MapMate folder is currently found directly under the C drive [ C:\Mapmate ] and runs as Administrator and in XP SP3 Compatibility Mode.

The Import from Tab-Text file does not work properly- it seems to find the correct file and detects any major errors as usual.
However, after testing the file I run through the 'Check and Resolve content' options, and it lies to me, saying all records are already in the database, when I know they are not.
If I then 'Import Now' nothing is added to the database.

Possibly a related problem, some of the existing User Queries seem to be wanting to run from
C\Documents and Settings\Dad\My Documents\My Mapmate\Data\Taxa\Schedules.mdb

We have tried moving the Cache, Maps, output and other folders into MyDocuments\My MapMate\Data but this doesn't seem to make any difference to either problem.

Has anyone any suggestions as to what to do next? Is it re-install time?
Thank you for any help!

Lizzy Peat
HBIC

Re: Tab-Text Import, and Queries not working

Sounds like an attempt was made to use the new location for the files but not completed. When installed on a W7 or Vista machine Mapmate suggests that the new locations allowed could be used and offers the choice. On W7 this should have been c:\users\username\My Documents\My Mapmate\...

Perhaps this was a vista upgraded to W7 or copied from a Vista/Xp installation.

I would install MapMate on another machine and follow the transferring to another PC instructions from MapMate. If the problem goes away you will be able to replicate the move.

Tony

Tony Price
Data Manager, Somerset Environmental Records Centre (SERC)

Re: Tab-Text Import, and Queries not working

Hi Lizzy,

Sounds like you have an old version of MapMate based on the location of your data. You can download the v2.4 installer from here - http://mapmate.co.uk/alex/

I would first backup your entire MapMate directory, ensuring you include Maps, Records, Reference, Sites etc.

Official guidance from MapMate is here - http://www.mapmate.co.uk/newsletters/81

You shouldn't have to supply your CUK and serial number again during installation as these are stored in the registry (HKEY_CURRENT_USER\Software\VB and VBA Program Settings\MapMate). Have them to hand though just incase. After the reinstall your custom filters for site and taxa will disappear so you will need to run through the configuration wizard to get them back.

Unrelated but perhaps useful: We also use a batch script to xcopy the entire folder structure daily to a shared drive on the network. We keep 30 days worth of 'snapshots'. These are useful just incase somebody syncs you a ton of duplicate or irrelevant records as MapMate doesn't have a rollback function built in. If anybody would find this useful I can post the script we use along with an explanation of how it works and how to add it to the scheduler.

Re: Tab-Text Import, and Queries not working

bazmole wrote:

If anybody would find this useful I can post the script we use along with an explanation of how it works and how to add it to the scheduler.

Yes please that could be useful.

Tony Price
Data Manager, Somerset Environmental Records Centre (SERC)

Re: Tab-Text Import, and Queries not working

re: MapMate snapshots

Hi Tony,

Sorry for the delay in reply. I never noticed your post from the 18/06. To make up for the delay I have created a modified version of the script we use to cater for a different scenario.

Scenario A - You have access to a corporately managed shared drive and somebody else is responsible for managing snapshots / backups. This is our scenario as we are hosted by a local authority. The local authority has a data centre team that back up to tape nightly and weekly. So all we have to do is get our data onto the shared drive. We can ask the data centre guys for snapshots to be restored from various times if need be.

i) create a blank text file called mapmate_bak.bat (or whatever you want as long as the ext is .bat). right click on the file and select Edit (this should open notepad)
ii) copy and paste the line of text below

xcopy "C:\Users\paul.barrington\Documents\My MapMate\*.*" "S:\LRC\MapMate\_GMLRC Mapmate Backups\9kk\" /s /r /d /y /i

iii) change the source and destination file paths as appropriate for you. remember to leave the trailing \s and *.* from the source as in the example above

NOTES
/s includes subdirectories in the copy
/r includes read-only files
/d makes the copy more efficient by ignoring files that have not changed since the last time the script ran
/y automatically overwrites existing destination files
/d where the destination directory does not exist yet cmd will create a new directory without prompting for manual input re: file or directory

iv) save changes and close notepad. double click on the .bat file to run it or add it to the windows scheduler to run every n days / weeks. we run ours every day at startup using the scheduler

* * * * * * * * * * * * *

Scenario B - You don't have the luxury of a data centre team / shared drive and you are responsible for your own snapshots. When this version of the script runs it retains previous snapshots allowing you to manually roll-back to various previous states.

i) create a blank text file called mapmate_bak.bat (or whatever you want as long as the ext is .bat). Right click on the file and select Edit (this should open notepad)
ii) copy and paste the lines of text below


:: start of script

@echo off
cls

:: user defined variables

SET locationOfSnapshots=c:\mapmate_bak
SET numberOfSnapshots=7
SET locationOfMapMateInstall=c:\Users\paul.barrington\Documents\My MapMate\Data



:: display confirmation for user when script runs

@echo using directory %locationOfSnapshots% & echo.script set for %numberOfSnapshots% snapshots
@echo:
@echo ** you can change these settings by editing the .bat file **
@echo:



:: create snapshot folders the first time the script is run in each %locationOfSnapshots%
FOR /L %%G IN (1, 1, %numberOfSnapshots%) DO if not exist %locationOfSnapshots%\%%G mkdir %locationOfSnapshots%\%%G & echo - %locationOfSnapshots%\%%G created




:: delete the oldest snapshot (directory named 1)
rd %locationOfSnapshots%\1



:: rename directory 2 to 1, 3 to 2, 4 to 3 etc. to move older snapsnots down the chain
setlocal enabledelayedexpansion
FOR /L %%G IN (2, 1, %numberOfSnapshots%) DO (
SET /a newName=%%G-1
ren %locationOfSnapshots%\%%G !newName!
)



:: copy the contents of the MapMate install directory to the location of snapshots. the directory name is the numberOfSnapshots value
xcopy "%locationOfMapMateInstall%\*.*" "%locationOfSnapshots%\%numberOfSnapshots%\" /s /r /d /y /i /q

@echo:
@echo snapshot created %locationOfSnapshots%\%numberOfSnapshots%\
pause

:: end of script



iii) change the user defined variables at the top as appropriate for you. number of snapshots determines how many generations you want to keep. in the example above I have used 7. each time the script runs the latest 7 backups of MapMate are retained. the oldest one is deleted once you have 7 backups.

iv) save changes and double click on the .bat file to run it or add it to the windows scheduler to run every n days / weeks. I would recommend running this manually immediately before doing any large imports / update queries. that way if new data or the query corrupts your record set you can just close mapmate and restore the most recent copy of the data directory. I've had to do this a few times when I've been given a large batch of duplicate records with different GUKs


Hope this helps.

note: having just proof read this post you could probably make the script for scenario 2 more efficient by using fc to compare the latest backup taken to the existing 'live' mapmate folder structure and including an if statement to only copy if something has changed. I dont have time to read up on fc at this time though. Let me know if this is any use. It has saved my bacon a few times as you never know what you might receive in new sync files :-)

Re: Tab-Text Import, and Queries not working

note 2: remove the pause from the end of scenario 2 script to have cmd automatically close when the copy has been completed. I put the pause in when I was creating the script to test each statement and forgot to delete it before copying and pasting into the comment box