Posted By:
Anonymous
Posted On:
Tuesday, February 10, 2004 01:14 AM
Look at the sample Code:
------------------------
Class.forName("org.gjt.mm.mysql.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/[db_name]","","");
Statement st=con.createStatement();
String query="select * from [table_name]";
rs=st.executeQuery(query);
but make sure to put mysql-connector-java-3.1.0-alpha-bin.jar file in classpath. (You may get this jar file from net.)
hope this helps..