解决方案 »
- mysql,求大神,来sql!!!
- struts2文件上传怪异问题
- java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error: hex to raw con
- 用jquery验证网址
- 关于struts资源文件的问题
- java服务器端如何与.net客户端通过soap交换附件内容
- 为什么将jsp-api.jar包放在jdk**\jre\lib\ext下就报错?
- 求助:文档解析时中文转化问题
- 如何创建一个javabean?存储路径是什么?
- Weblogic 6.1启动有的时候出现这种错误,这是为什么?急!
- 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)
数组越界……