und zwar bekomm ich einfach keine DB connection her...
was ich auch mache scheint verkehrt zu laufen.
hier der code:
- Code: Select all
/*
* Created on 20.04.2005
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package TestverbindungJavaDB;
import java.net.URL;
import java.sql.*;
/**
* @author g
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
class Abfrage
{
public static void main (String args[])
{
try
{
Class.forName("com.mysql.jdbc.Driver");
Connection connection =
DriverManager.getConnection("jdbc:mysql://localhost:3306/mysql","root","");
System.out.println("++openDB(): ");
}
catch(java.lang.ClassNotFoundException e)
{
System.out.println("ClassNotFoundException");
}
catch(java.sql.SQLException e)
{
System.out.println("Fehler beim Abfragen der Datenbank");
}
}
}
//-----------------------------------------
Ausgabe mit folgender Fehlermeldung:
ClassNotFoundException
wenn jemand mehr weiss....
danke schon im vorhinein für eure bemühungen