Hi,
I have been given the following code but I get an error stating difficulties in connecting to the database.
Please excuse my ignorance but what is lochport? Should this not be the name of the database I wish to connect to? The database I wish to connect to is called kirky.mdb
Many thanks for any help received.
public void Connection()
{
java.lang.String s = "jdbc
dbc:lochport";
java.lang.String s1 = "";
java.lang.String s2 = "";
try
{
java.lang.Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"
;
}
catch(java.lang.Exception exception)
{
java.lang.System.out.println("Failed to load JDBC/ODBC driver."
;
return;
}
try
{
m_Con = java.sql.DriverManager.getConnection(s, s1, s2);
m_Stmt = m_Con.createStatement();
}
catch(java.lang.Exception exception1)
{
java.lang.System.err.println("problems connecting to " + s);
}
}
I have been given the following code but I get an error stating difficulties in connecting to the database.
Please excuse my ignorance but what is lochport? Should this not be the name of the database I wish to connect to? The database I wish to connect to is called kirky.mdb
Many thanks for any help received.
public void Connection()
{
java.lang.String s = "jdbc
java.lang.String s1 = "";
java.lang.String s2 = "";
try
{
java.lang.Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"
}
catch(java.lang.Exception exception)
{
java.lang.System.out.println("Failed to load JDBC/ODBC driver."
return;
}
try
{
m_Con = java.sql.DriverManager.getConnection(s, s1, s2);
m_Stmt = m_Con.createStatement();
}
catch(java.lang.Exception exception1)
{
java.lang.System.err.println("problems connecting to " + s);
}
}