Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JDBC problem

1 view
Skip to first unread message

ukal...@my-deja.com

unread,
Sep 23, 2000, 3:00:00 AM9/23/00
to
I've got a java class that connects to the database, checks to see if
some
data exists in the database. If the data doesn't exist, it is inserted.
If
it does exist, the quantities are updated.

The problem happens in the update. I get two different errors, never at
the
same time. I can submit the form multiple times, and sometimes I get one
error message, and other times I get the other.

Here's one:

java.sql.SQLException: Communication link failure: java.io.IOException
at org.gjt.mm.mysql.MysqlIO.clearAllReceive(MysqlIO.java)
at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(MysqlIO.java)
at org.gjt.mm.mysql.Connection.execSQL(Connection.java)
at
org.gjt.mm.mysql.PreparedStatement.executeQuery(PreparedStatement.java)

Here's the other:

java.sql.SQLException: Syntax error or access violation: Query was empty
at org.gjt.mm.mysql.MysqlIO.sendCommand(MysqlIO.java)
at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(MysqlIO.java)
at org.gjt.mm.mysql.MysqlIO.sqlQuery(MysqlIO.java)
at org.gjt.mm.mysql.Connection.execSQL(Connection.java)
at org.gjt.mm.mysql.Connection.execSQL(Connection.java)
at org.gjt.mm.mysql.Statement.executeUpdate(Statement.java)
at org.gjt.mm.mysql.jdbc2.Statement.executeUpdate
(Statement.java:97)

Any suggestions? I'm using JDK 1.3 & the mm.mysql-2.0.2-bin.jar.zip
driver.
Thanks for any help.

--Michael

Sent via Deja.com http://www.deja.com/
Before you buy.

0 new messages