Anybody know how to load an ODBC driver into Android?  For example, a
MySQL driver?  The usual drill doesn't seem to work.  Class.forName
blows out.

import com.mysql.jdbc.*;

  class odbcConnection {
     public static Connection getConnection() throws Exception {
          Driver d = (Driver)Class.forName
("com.mysql.jdbc.Driver").newInstance ();

          DriverManager.registerDriver(d);

          String URL = "jdbc:mysql:xxxx";

          d = DriverManager.getDriver(URL);

          Connection c = DriverManager.getConnection(URL, "yyyy",
"xxxx");
          return c;
        }
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to