我是 ADF Mobile 的新手,之前使用 NetBeans 连接过 SQLite DB。我正在复制代码,并且收到Import java.sql.DriverManager not found错误(粗体)。
包手机;
import java.sql.Connection;
**import java.sql.DriverManager;**
import java.sql.*;
public class Connect {
public Connect() {
super();
}
public class JavaConnect {
static Connection conn = null;
static ResultSet rs = null;
static PreparedStatement pst = null;
public static Connection DBConnect() {
try {
Class.forName("org.sqlite.JDBC");
conn = DriverManager.getConnection("jdbc:sqlite:AlternativeIdentification.sqlite");
System.out.println("Connection established");
return conn;
} catch (Exception ex) {
System.out.println("Error: " + ex);
return null;
}
}