java 连接 access 的问题,
求指点,代码如下:package sql;
import java.sql.*;
public class Examplet_1
{
public static void main(String args[])
{
Connection con;
Statement sql;
ResultSet rs;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}catch(ClassNotFoundException e)
{
System.out.println(e);
}
try
{
con = DriverManager.getConnection("jdbc:odbc:star");
sql = con.createStatement();
rs = sql.executeQuery("SELECT * FROM employee WHERE salary>190");
while(rs.next())
{
String number = rs.getString(2);
String name = rs.getString(3);
Date date = rs.getDate("birthday");
double salary = rs.getDouble("salary");
System.out.printf("% - 4s",number);
System.out.printf("% - 6s",name);
System.out.printf("% - 15s",date.toString());
System.out.printf("%6s\n",salary);
}
con.close();
}catch(SQLException e )
{
System.out.println(e);
}
}
}
问题是
java.sql.SQLException: [Microsoft][ODBC Microsoft Access 驱动程序] 参数不足,期待是 1。
求指点