accessing mySQL database with Java
From: Raphi (rapsli_at_yahoo.de)
Date: 10/28/04
- Previous message: Mikhail Danilov: "Re: streaming "for xml" to sax xslt-transformation"
- Next in thread: David Harper: "Re: accessing mySQL database with Java"
- Reply: David Harper: "Re: accessing mySQL database with Java"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 Oct 2004 09:46:33 -0700
Hello
Finally i could get the jdbc driver to run, but the rest is still not
running. i could successfully create a database and a table with the
command line, but from the applet i wrote, i can't access it. here the
code and then the error messagen:
the name of the table is: esgeht.
void database() throws ClassNotFoundException, SQLException{
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
System.out.println("ok. ist gegaxt");
} catch(ClassNotFoundException e){
System.out.println("nicht gegangen");
}
String url = "jdbc:odbc:esgeht";
Connection con = DriverManager.getConnection(url,"admin","admin");
}
ok. ist gegaxt
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Der
Datenquellenname wurde nicht gefunden, und es wurde kein
Standardtreiber angegeben
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at HelloWorld.database(HelloWorld.java:51)
at HelloWorld.start(HelloWorld.java:32)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
any ideas what i could do???? while I'm asking... when i create the
database. is it possible to use there a different password for each
database??
raphi
- Previous message: Mikhail Danilov: "Re: streaming "for xml" to sax xslt-transformation"
- Next in thread: David Harper: "Re: accessing mySQL database with Java"
- Reply: David Harper: "Re: accessing mySQL database with Java"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|