准备好的语句失败 [英] Prepared Statement Failing

查看:145
本文介绍了准备好的语句失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用准备好的语句,该语句应该(使用SQL和JDBC)将数据插入到dataTable中.我正在使用一种删除可以正常工作的数据的方法,但是插入一种方法是不在数据表中插入任何数据,并且不会产生错误或警告.是什么导致准备好的语句以这种方式失败? 可以在准备好的语句中插入null值吗?

I'm using a prepared statment that should (using SQL & JDBC) insert data into a dataTable. I am using one that deletes data that works fine, but the insert one is not inserting any data into the data table and does not produce an error or warning. What could cause a prepared statement to fail in this way? Could inserting a null value into the prepared statement cause this?

推荐答案

失败,但不会产生错误"是什么意思?您怎么知道那是失败的-实际没有插入数据吗?也许您不打算进行交易?

What do you mean by "failing, but does not produce an error"? How do you know it's failing then - is data not actually being inserted? Perhaps you're not committing a transaction?

这篇关于准备好的语句失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆