我在使用odbc桥连接数据库,并使用PreparedStatement插入日期类型数据时,总是出现以下的问题:
我的插入代码是:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection("Jdbc:Odbc:t");
String str="insert into d(birthday) values(?)";
ps=conn.prepareStatement(str);
ps.setDate(1,Date.valueOf("1986-9-24")) ;
报出以下错误:
java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]没有执行可选特性
请问怎么回事?谢谢了!
我的插入代码是:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection("Jdbc:Odbc:t");
String str="insert into d(birthday) values(?)";
ps=conn.prepareStatement(str);
ps.setDate(1,Date.valueOf("1986-9-24")) ;
报出以下错误:
java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]没有执行可选特性
请问怎么回事?谢谢了!
这句好像不对
去这里看看!