Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Bizarre error using DBD::ODBC

by jryan (Vicar)
on Apr 08, 2005 at 15:21 UTC ( #446040=perlquestion: print w/ replies, xml ) Need Help??
jryan has asked for the wisdom of the Perl Monks concerning the following question:

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')

Comment on Bizarre error using DBD::ODBC
Select or Download Code
Replies are listed 'Best First'.
Re: Bizarre error using DBD::ODBC
by NateTut (Deacon) on Apr 08, 2005 at 15:27 UTC
    Could it be M$'s way of telling you it timed out? Can you confirm that the query is successfull from another tool?
Re: Bizarre error using DBD::ODBC
by gellyfish (Monsignor) on Apr 08, 2005 at 15:42 UTC

    The HY000 SQLSTATE indicates a general error which is indicated by the text either in the ODBC driver itself or where the lower level engine has not indicated an error code itself. I think you will find the solution in this article.

    /J\

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://446040]
Approved by insaniac
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (10)
As of 2015-07-30 23:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls