Java Prepared statement not executing

后端 未结 4 562
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-24 02:46

I have created a small 3 tier program, consisting of : front end -> servlet -> database.

Front end I enter some details into a form. They are passed to a servlet, which

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-24 03:14

    You should invoke the method executeUpdate() on the statement object.

    Also, I don't see any call to commit the data, any transaction handling. It's fine if you skipped that piece of code for the purpose of this question; otherwise it's quite an important step ( commit if all goes well, rollback for exception scenarios)

提交回复
热议问题