每次都报this method is not yet implemented以及SQL Exception图片说明
求大神帮助解决啊。。。
package com.ezio.mvc.mar4.test;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import javax.sql.DataSource;
import org.apache.commons.dbutils.QueryRunner;
import org.junit.Test;
import com.ezio.mvc.mar4.db.JdbcUtils;
import com.mchange.v2.c3p0.ComboPooledDataSource;
public class TestConnection {
@Test
public void test() throws SQLException {
Connection conn = JdbcUtils.getConnection();
/*String sql = "INSERT INTO customers(name, address, phone) VALUES(?, ?, ?)";
PreparedStatement pstm = conn.prepareStatement(sql);
pstm.setString(1, "123");
pstm.setString(2, "asdfasdfasf");
pstm.setString(3, "abc");
pstm.executeQuery();*/
QueryRunner queryRunner = new QueryRunner();
String sql = "INSERT INTO customers(name, address, phone) VALUES(?,?,?)";
queryRunner.update(conn, sql, 10, 32, 63);
}
}
这个是我的源码,数据库连接没有问题,我本人已经测试过。不管我怎么搞,都无法执行操作啊。