Results 1 to 3 of 3

Thread: GXT + MySQL

  1. #1

    Default GXT + MySQL

    How to work with MySQL on GXT (java) ?

    I have tried:
    import java.io.IOException;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    But it says that imports does not supports by GWT.

    http://code.google.com/p/gwt-example...ject_MySQLConn
    does not work eather.

    private Connection getConn() {

    Connection conn = null;
    String url = "jdbc:mysql://localhost:3306/";
    String db = "wevote";
    String driver = "com.mysql.jdbc.Driver";
    String user = "root";
    String pass = "";

    try {
    Class.forName(driver).newInstance();
    } catch (Exception e) {
    e.printStackTrace();
    }

    try {
    conn = DriverManager.getConnection(url+db, user, pass);
    } catch (Exception e) {
    System.err.println("Mysql Connection Error: ");
    e.printStackTrace();
    }

    return conn;
    }

  2. #2
    Sencha Premium User
    Join Date
    Nov 2008
    Location
    Vienna - Austria
    Posts
    888

    Default

    Hi.

    Not the entire java jre is supported by gwt.
    I strongly recommend you reading the gwt developer's guide, as this is more a gwt topic then a gxt one.

    http://code.google.com/webtoolkit/do.../DevGuide.html

    Regards,
    Michel.

  3. #3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •