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!

In reply to Re: problem with Win32::ODBC by BrowserUk
in thread problem with Win32::ODBC by Discipulus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.