As hiseldl says, you may find this information, in the registry, but if Win32::ODBC::getDSN() isn't returning the DBQ key, it may well be that this information is not available there. I'm not sure about the circumstances when this occurs, but, for example, on my system I have the remnents of a couple DSN's that was set up by the installs of some peices of software now long gone which don't have an DBQ entries. However, there is an entry in the registry HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\odbc.ini\ODBC File DSN\DefaultDSNDir which points to (on my system) D:\Program Files\Common Files\ODBC\Data Sources. In this directory I have a couple of files, an example of which is Authors.dsn containing:
ODBC]
DRIVER=Microsoft Access Driver (*.mdb)
UID=admin
UserCommitSync=Yes
Threads=3
SafeTransactions=0
PageTimeout=5
MaxScanRows=8
MaxBufferSize=512
ImplicitCommitSync=Yes
FIL=MS Access
DriverId=25
DefaultDir=D:\Inetpub\iissamples\sdk\asp\database
DBQ=D:\Inetpub\iissamples\sdk\asp\database\Authors.mdb
with the last line being the info that you are interested in.
One final caveat. If the DSN you are using is a so-called 'System DSN', ie. one that lives outside of your box on a server somewhere, the DBQ information will probably not be available to you through any normal programable mechanism. This is a standard security feature.
Well It's better than the Abottoire, but Yorkshire! |