Although you haven't offered any details, "line 1" in the error message suggests to me that your SQL is being generated dynamically. Nothing wrong with that, in fact that's usually the whole point of having programs interact with databases. But my strategic advice to anyone starting out with DBI is to pratice first with a simple static SQL statement, your database's equivalent of print 'Hello, world!'.

Run a query through the MSAccess GUI, then view the underlying SQL and copy that into your Perl program. Get a feel for how DBI works by successfully doing something simple before you move back to the problem that prompted this post.

Then go the other way. Have your Perl program print out your SQL just before it executes it. Paste the printed out SQL back into the SQL view of the MSAccess query designer.

By all means come back to Perlmonks with questions about your results, and when you do, post some code.

Good luck!


In reply to Re: DBI SQL error messages by Narveson
in thread DBI SQL error messages by rjberry

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.