Good afternoon,
How do I make the connection to SQLite DB? I made the connection class like this.
package model;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class Conexao {
public static void main( String args[] ) {
// Variáveis
Connection con = null;
String driver = "org.postgresql.Driver";
String dir = "jdbc:sqlite:test.db";
String user = "postgres_usuario";
String pass = "postgres_senha";
try {
Class.forName("org.sqlite.JDBC");
con = (Connection) DriverManager.getConnection(dir, user, pass);
} catch (ClassNotFoundException ex) {
ex.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
Thank you in advance!