Thanks for the info.. But i already have a database authenticated. When i open a .sql file, it goes for server check with windows authentication, then the shows the query results.

So do i need to provide any information on server info in .SQL file or perl script?

And as per the ur info and also the error i get, can i run my select query directly. Bcos, i receive the error usr.lck does not exist. Does it mean, i need to create these 3 files first using create query(my table is already there in DB)?

From ur DBM Select script, i don't see the .sql file or Database reference in the script. As my perl & .sql are in same folder, is above script fine to be run with same code u provided


In reply to Re^4: DBI::DBM - How to use this for SQL connection by Anonymous Monk
in thread DBI::DBM - How to use this for SQL connection by Anonymous Monk

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.