解决方案 »
- The requested resource (/Struts2.0/index.jsp) is not available.
- 如何把网站发布出去
- 几道java面试题,求答案~~~
- jmai 4.5
- struts中将jsp表单中数据封装到 form bean的原理
- 求救大侠们:使用hibernate 怎么也无法读取到hibernate.cfg.xml文件 的问题
- java读取数据库数据的问题
- 高手指点JDBC中ResultSet有哪些方法呀
- 如何将Tomcat5和j2se与发布站点一起打包成安装文件?有做过的请指教
- struts問題﹐高分求救﹗
- java怎么设置默认的打印设备
- apache+tomcat负载均衡配置后,apache无法访问
Class.forName("com.mysql.jdbc.Driver");
conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/comfan_class_memery", "root", "123456");
String sql = "call classm_p_ur_idgeneration_pp(@xx);\n" +
"select @id as id;";
Statement st = conn.createStatement();
ResultSet rs = st.executeQuery(sql);
if(rs.first()){
System.out.println(rs.getString(0));
}
"select @id as id";
依然有错 异常信息 是 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';select @id as id' at line 1
是MySQL的语法....
要实现我过程里面的处理结果返回用什么方法好呢?
select CONCAT(ctprop.data,DATEDIFF(NOW() , '1970-01-01 08:00:00.000'),CEILING(RAND()*100000000000))
from classm_t_propreties ctprop where `key`='user.idgeneration.ad';直接在JDBC中执行这句即可
这是啥意思啊?这个错.Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at com.mysql.jdbc.CallableStatement.setInOutParamsOnServer(CallableStatement.java:2270)
at com.mysql.jdbc.CallableStatement.executeQuery(CallableStatement.java:952)
at cn.comfan.integer.number.convert.test.NumberConvertorTest.main(NumberConvertorTest.java:47)
这是啥意思啊?这个错.Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at com.mysql.jdbc.CallableStatement.setInOutParamsOnServer(CallableStatement.java:2270)
at com.mysql.jdbc.CallableStatement.executeQuery(CallableStatement.java:952)
at cn.comfan.integer.number.convert.test.NumberConvertorTest.main(NumberConvertorTest.java:47)
数组越界……