Hi Tony

If you're looking for a solution where the connect() returns a "Database file does not exist" instead of checking for the existance of the file yourself, then your best bet is to contact Mat Sergeant who wrote DBD::SQLite. Ask politely for the new feature using rt.cpan.org.

This is because, as others have already mentioned, that this particular feature is DBD specific. You could always subclass DBD::SQLite and write the check yourself, but I would recommend against it unless you are familiar with Perl's ways of OOP. Do *NOT* modify DBD-SQLite directly yourself as the next time you update your cpan modules, it will be overwritten.

Order of preference:

  1. test the file existance yourself
  2. have DBD::SQLite maintainers make the modification
  3. subclass DBD::SQLite

Hope this helps

Jason L. Froebe

Team Sybase member

No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1


In reply to Re: Determining if SQLite db exists by jfroebe
in thread Determining if SQLite db exists by TonyDonker

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.