
.mdb path to Access datasource
I have an Access '95 odbc datasource named ITEM set up and I need to
determine the path to the .mdb file for that source
at runtime. I know that for data access, I don't need this - I'd just use
the DSN, but I need the path itself as a string for
other reasons.
I found the entry in the registry under
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\odbc.ini\ITEM\DBQ
and tried to grab the string using GetSetting, but it kept returning an
emptry strng. I may be passing the wrong
parameters. GetSetting needs (appname,section,key) I use "DBQ" for the key,
but I'm not sure what values to use for
appname and section.
Could anyone fill in the holes here, or is there an easier way to do this?
Any help would be greatly appreciated,
Chris Desany