List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:November 20 2001 4:58pm
Subject:Re: why doesn't prepared statement work?
View as plain text  
In the last episode (Nov 20), yilmaz said:
> Well,
> i am answering  my own question.
> It was keeping  telling me that there is a syntax error.
> However, the real problem was at the bottom the preparedstatement code
> snippet
> "stmt.executeUpdate(query);"
> statement should have been
> "stmt.executeUpdate();" (without parameter)
> Wouldn't it make our lives easier if MySQL had thrown a sensible and
> a logical error message so that developers need not to waste a lot of
> time on a fairly small problem?

MySQL doesn't come with a Java interface, so it cannot have thrown an
exception.  According to the contributed software page, there are a
number of JDBCs you can choose from.  Make sure you are using the
latest version of whichever driver you have, and if it still doens't
work, try using a different JDBC, or send a bug report to the author.

-- 
	Dan Nelson
	dnelson@stripped
Thread
why doesn't prepared statement work?yilmaz20 Nov
  • Re: why doesn't prepared statement work?yilmaz20 Nov
  • Re: why doesn't prepared statement work?DL Neil20 Nov
  • Re: why doesn't prepared statement work?yilmaz20 Nov
  • Re: why doesn't prepared statement work?yilmaz20 Nov
    • Re: why doesn't prepared statement work?Dan Nelson20 Nov