我有一个问题,调用一个程序,我想设置两个paramams。在程序中,第一个参数必须是int和secod时间。我这样做了:
beans = (List) qRunner.query(conn, "call mpklocal.LCD_GetDispInfoChange_TEST(?, CURTIME() )", timtableId ,
new BeanListHandler(AnotherBusInBusStop.class));
当我关闭程序时,我看到了:
Java.sql.SQLException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT CURTIME())' at line 1 Query: call mpklocal.LCD_GetDispInfoChange_TEST(?,SELECT CURTIME()) Parameters: [657983]
at org.apache.commons.dbutils.AbstractQueryRunner.rethrow(AbstractQueryRunner.java:392)
at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:351)
at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:180)