SQL Server usually comes with useful sample databases to demonstrate new features and some possible design. I usually find sample databases far more useful as a playground for developing generic components against an existing database to use in other projects. I find that using a empty or too small a database makes for a misleading development experience because when the components is then used in an actual production database, performance problems crop up in places you never anticipate.
For a while, Microsoft has used Wide World Importers database which is quite a full-fledged database with several tables, views, and procedures plus few more. One problem, however, is that the database in its current design is not compatible with Access applications because it uses datetime2(7)
which requires one to use the new extended date/time data type. That is not so great when you need to allow for backward compatibility. But there’s better things to do than despair and lament.
As I’ve argued in various places, datetime2(0)
is actually better for compatibility between SQL Server database and Access applications because both datetime2(0)
and Access’ Date/Time
and VBA’s Date
data types have same level of precision and similar ranges which is much better than the legacy SQL Server datetime
which uses a weird precision of 1/3 milliseconds (one has to wonder if someone was smoking something less than legal when they thought that data type up!).
So by modifying the sample database to use datetime2(0)
in place of datetime2(7)
, the sample database can be then made compatible with Access without any modifications beyond simply linking the tables. So, we have a handy sample database to play with. This hefty sample weighs at around 140MB so plan accordingly.
Enjoy!
Modified Wide World Importers database
Disclaimer: This is offered as-is, with no warranty or guarantees. Caveat emptor, you break it, you bought it, with great download, comes great responsibility, etc. etc. 🙂
¿Que versión de Sql es el backup ?
How do I open WWI_Modified.bak in Access, do I need to rename it?
No; it’s a SQL Server backup so you’ll need to restore it to a SQL Server instance. You can then link to the database from your Access application. With the original database from the sample downloaded linked in the start of the article, it would not work with Access when you update data due to prevalence of the
datetime2(7)
causing an error in the Access application with linked tables to it. You would then have to modify the application to use the extended date/time feature. This modified copy avoids those problems without having to enable that feature. I hope that clarifies things.