摘要:package com.myivtec.type4.test;import java.sql.Connection;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement;import java.sql.Timestamp;import junit.framework.TestCase;import com.myivtec.type4.util.DB;public class PrepareadeStatementTest
阅读全文
摘要:package com.myivtec.type4.test;import java.sql.Connection;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement;import java.sql.Timestamp;import com.myivtec.type4.util.DB;import junit.framework.TestCase;public class JdbcTest extends TestCase { private Connection con ; ...
阅读全文
摘要:import java.sql.DriverManager;import java.sql.Connection;import java.sql.Statement;public class Type { static { try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");//驱动为sun提供的 加载驱动 这个驱动是所有数据库通用的 这是一种jdbc的连接方式 “里为jdbc驱动名” }catch(ClassNotFoundException e) { e.printStackTrace(); } } public st.
阅读全文