I'm encountering a totally bizarre error using DBI and DBD::ODBC. I'm using it to connect to a .mdb access database located on a network drive. The terrible thing about the error is that it isn't consistant, and makes absolutely no sense. It occurs on an $sth->execute line, and seems to suggest that the query simply failed:
DBD::ODBC::st execute failed: [Microsoft][ODBC Microsoft Access Driver
+] The sear
ch key was not found in any record. (SQL-HY000)(DBD: st_execute/SQLExe
+cute err=-
1) at Batch.pm line 272.
However, I don't understand why it wouldn't just return 0 records instead of throwing a fatal error.
I'm not sure it affects anything, but here is the query:
SELECT ITE_BILL.COMPONENT AS item_type
,ITE_BILL.COMP_DESC AS description
,ITE_BILL.QUANTITY AS qty
,ITE_BILL.PARENT AS parent_id
,ITE_BILL.DRWG AS dwg_num
FROM ITE_BILL
WHERE (PARENT='7531MD6010B' OR PARENT='7461RD1001' OR PARENT='753
+1MK7010B')
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|