Setting up a database |
Top Previous Next |
Why?
The SecondOrder client can store its data in a relational database, which is a Very Good Idea and can save you a great deal of time and effort. It needs a database containing tables with particular names and layouts. Rather than describe this in exhaustive detail, I've supplied a sample database with Whisker, for use with Microsoft Access 97 or later. It's on the menu (shown earlier).
However, I strongly recommend you make a copy of this database and do not use the original that I have supplied; firstly, because then you won't lose any data if you uninstall Whisker (this procedure deletes the supplied database), and secondly, because you can make multiple copies for different purposes (perhaps different experimenters).
Configuring an ODBC data source
SecondOrder chooses and finds its database using the Open Database Connectivity (ODBC) system, which allows programs to talk to databases from a wide variety of manufacturer (i.e. not just Access). You must set up your copy of the database as a data source.
ODBC must be installed on the computer. (It is part of Windows 2000 and installed by all database software.)
Good. Now when you run SecondOrder, this DSN will be among the list you can choose from when your session is complete.
Technical notes Record-locking. When several copies of SecondOrder are running, there is a chance that they both try to store their data in the same database at (almost) the same time. This creates a problem: the first copy will lock the tables while it stores new data, during which time the second copy can't gain access. If this happens, the second client will report an error, and the user can (and is recommended to) click Retry to have another go.
Configuring MS Access database parameters. However, we can reduce the likelihood of an error being reported by making the database system try for longer itself. In any Access database that you wish to configure, choose Tools → Options → Advanced. You can then specify the Number of Update Retries (default 2, you want 10) and the ODBC Refresh Interval (default 250 ms, you want 1000 ms). This has already been done for the second-order database.
|