Hello Friends, I´m novice in JDBC and Servlets, so i need help.

I´m trying to access to a remote mysql database using java, i receive a
error when i access, it give
me

<!-- ERROR2 -->
<!-- ERROR2 -->

that is the code i use, is correct?

     try
  {         String urlBD =
"jdbc:mysql://sub.dominio.net/databasename?user=miuser&password=mipass";
            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            Connection conexion =
DriverManager.getConnection(urlBD,"miuser","mipass");
            Statement select = conexion.createStatement();
            ResultSet resultadoSelect = select.executeQuery("SELECT * FROM
tabla");
            select.close();
            conexion.close();
        } catch (SQLException e)
  {   System.out.println("<!-- ERROR1 -->");
            System.out.println("<!-- " + e.getMessage() + " -->");
        } catch(Exception ex)
  {   System.out.println("<!-- ERROR2 -->");
        }

My CLASSPATH variable points to :

:/usr/jre1.2/lib/elingo.jar::/usr/jre1.2/lib/mysql/mysql.jar:.:


What is my problem? (.......that i´m novice)

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to