w*********y 发帖数: 28 | 1 我坚信(经验证)database,listener都是好的。也可以建立Connection,Statement。
但执行下面这段语句,就死住了,没有任何错误信息返回,也catch不了任何error。
fact_iRowCount += stmt1.executeUpdate("INSERT INTO fact"+
" VALUES(1,758,1,748,12,6,190)");
况且,"INSERT INTO fact VALUES(1,758,1,748,12,6,190)"在SQL/PLUS 下执行是正确的
。
大家看可能是什么问题?多谢了! | z****g 发帖数: 2497 | 2 试试PreparedStatement instead of Statement.
然后看看能不能做query. 不能的话, 很可能是driver有问题。
但是不能catch exception 有点奇怪。除非在driver里面死循环了。
【在 w*********y 的大作中提到】 : 我坚信(经验证)database,listener都是好的。也可以建立Connection,Statement。 : 但执行下面这段语句,就死住了,没有任何错误信息返回,也catch不了任何error。 : fact_iRowCount += stmt1.executeUpdate("INSERT INTO fact"+ : " VALUES(1,758,1,748,12,6,190)"); : 况且,"INSERT INTO fact VALUES(1,758,1,748,12,6,190)"在SQL/PLUS 下执行是正确的 : 。 : 大家看可能是什么问题?多谢了!
| xt 发帖数: 17532 | 3
最好是把field名字都写出来.
【在 z****g 的大作中提到】 : 试试PreparedStatement instead of Statement. : 然后看看能不能做query. 不能的话, 很可能是driver有问题。 : 但是不能catch exception 有点奇怪。除非在driver里面死循环了。
| x***n 发帖数: 39 | 4 When no exception is thrown, I assume your program was still trying to
talk to the RDBMS server. Check the network traffic by using some sort
of listening software such as ethereal or commview. At the same time,
try to replace the server with another one, or try using another RDBMS
such as using MySQL. Also you can try issueing a dummy select statement
and see if it works.
【在 w*********y 的大作中提到】 : 我坚信(经验证)database,listener都是好的。也可以建立Connection,Statement。 : 但执行下面这段语句,就死住了,没有任何错误信息返回,也catch不了任何error。 : fact_iRowCount += stmt1.executeUpdate("INSERT INTO fact"+ : " VALUES(1,758,1,748,12,6,190)"); : 况且,"INSERT INTO fact VALUES(1,758,1,748,12,6,190)"在SQL/PLUS 下执行是正确的 : 。 : 大家看可能是什么问题?多谢了!
| st 发帖数: 1685 | 5 要是我,就先executeQuery看看。也会hang么?
【在 x***n 的大作中提到】 : When no exception is thrown, I assume your program was still trying to : talk to the RDBMS server. Check the network traffic by using some sort : of listening software such as ethereal or commview. At the same time, : try to replace the server with another one, or try using another RDBMS : such as using MySQL. Also you can try issueing a dummy select statement : and see if it works.
| x***n 发帖数: 39 | 6 This is definitely the best way to do. :-)
I was just trying to throw out some stuff for him to do.
【在 st 的大作中提到】 : 要是我,就先executeQuery看看。也会hang么?
|
|