开发者

PreparedStatement not executing!

So odd! :P

connection = appDatabase_.getDatabase().getConnection();
            PreparedStatement updateStmt = connection.prepareStatement
                    ("UPDATE " + getTableName() + " SET " + column
                               + " = ? WHERE " + ID + " = ?");

Got this chunk of code. After this comes some hard coded "set bytes" and "set int" statements.

And then an execute(). Pretty simple right?

Occasionally the prepared statement just fails to execute and the app acts very oddly (hard to explain how). Why and when would开发者_运维技巧 this happen? Maybe if the connection is closed?

Not sure what to think atm.

Thanks SO!


Well, since you didn't show us your try/catch and I know java.sql classes are full of declared checked exceptions, my guess would be you're eating exceptions somewhere.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜