in reply to problem with Win32::ODBC

Try looking in the registry, here's where you can find an entry, look at the "DBQ" value for the full path:

[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\myDSN]
"Driver"="C:\\WINNT\\System32\\odbcjt32.dll"
"DBQ"="C:\\Documents and Settings\\mydir\\DATA\\mydatabase.MDB"
"DriverId"=dword:00000019
"FIL"="MS Access;"
"SafeTransactions"=dword:00000000
"UID"=""

--
hiseldl
"Act better than you feel"

Replies are listed 'Best First'.
Re: Re: problem with Win32::ODBC
by Discipulus (Canon) on Sep 13, 2002 at 10:55 UTC
    many thanks,
    the access to the registry is a little bit obscure but it seems work..
    It works with system dsn too...
    here my resulting code:
    use Win32::TieRegistry ( Delimiter=>"/" );
    
    $dsn="testDSN";
    $odbc= $Registry->{"HKEY_LOCAL_MACHINE/Software/ODBC/ODBC.INI/$dsn/"}or  die "$^E\n";
    
    print $odbc->{DBQ}or die $!;
    

    I hope some day I can help someone in the same way you helped me.
    ciao lorenzo*