I'd think using a DB like Microsoft SQL Server 2000 Desktop Engine (MSDE 2000) would take care of the DB issues.
Why reinvent the wheel?
"MSDE 2000 is a royalty-free, redistributable database engine that is fully compatible with SQL Server. MSDE 2000 is designed to run on Microsoft Windows® 98, Windows Millennium Edition (Windows Me), Microsoft Windows NT® Workstation version 4.0 (with Service Pack 5 or later), and Windows 2000 Professional as an embedded database for custom applications that require a local database engine."
Of course, if you don't care about Win 9x support then Microsoft SQL Server 2005 Express Edition is a better tool.
"Microsoft SQL Server 2005 Express Edition (SQL Server Express) is a powerful and reliable data management product that delivers rich features, data protection, and performance for embedded application clients, light web applications, and local data stores. Designed for easy deployment and rapid prototyping, SQL Server Express will be available at no cost, and be free to redistribute with applications."