It seems to me that it would be easier to schedule a job (Perl or otherwise) to simply make a copy of the master with the dated file name.
For example: MainDB.MDB is the main database Nightly, it is copied from MainDB.MDB to: MainDB-2002-<MO>-<DY>.MDB Thus, you never have to change the DSN or the Perl script to reference a new file. Ben.... ----- Original Message ----- From: Valerie Kramer Sent: 3/14/2002 11:43:47 AM To: [EMAIL PROTECTED] Subject: Opening Access DB Files > I have a Perl program that opens a Microsoft Access database and reports > various information using the DBI module. (It also uses the TK module > to provide a GUI but I don't think that is relevant to my question.) On > the master computer, this is fine. To make DBI work, I've created a > user DSN data source for the database and it works just great. > > At least weekly, I copy the master database to a second machine and > rename it with a date in the name so I can tell them apart. I usually > have several files on hand at any given time and delete the oldest ones > as they start to pile up. This means I have to keep twiddling with the > data source to make sure it is accessing a current file. I would like > to make the Perl program able to access any of the files by simply > browsing the directory and selecting a file name instead of having to > create a data source for each different file that it will access. If > this is not possible, perhaps the Perl program could create the source, > use the file, then remove the source before terminating. I don't (yet) > have a clue how to approach this part of the problem. > > I suppose another solution would be to create the data source with a > dummy name then rename or copy the file I wish to use and give it the > name referenced by the DSN but that seems inelegant. > > Can anyone point me in the right direction? > > Thank you. > > Valerie > > > ....5...10....5...20....5...30....5...40....5...50....5...60....5...70.. > Valerie Kramer ........... Email: mailto:[EMAIL PROTECTED] > The Downtown Fun Zone .... Web Page: http://www.mydfz.com > 832 Hwy 101, Box 49 ...... Voice/Fax: (541) 332-6565 > Port Orford OR 97465 ..... 9:30-6pm M-Thu, 9:30-7pm Fri&Sat, closed Sun > > _______________________________________________ > Perl-Win32-Admin mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs