2 messages in com.mysql.lists.javaStupid question
FromSent OnAttachments
Sanjiv Bawa06 Aug 1999 16:05 
Mark Matthews06 Aug 1999 19:21 
Subject:Stupid question
From:Sanjiv Bawa (sba@tabmaster.com)
Date:08/06/1999 04:05:04 PM
List:com.mysql.lists.java

I am trying to get mysql to work with the mm jdbc driver

It gives me an error on the connect() statment saying

Visual Cafe (17:44:31): Error: D:\Program Files\VisualCafeES\Bin\TempPrj0\JApplet1.java(29): Can't make static reference to method java.sql.Connection connect(java.lang.String, java.util.Properties) in org.gjt.mm.mysql.Driver

What on earth is this all about ?

Also, is "jdbc::files" correct ? files is the server name.

Thanks.

import org.gjt.mm.mysql.*;

....

try { // Create a URL specifying an ODBC data source name. String url = "jdbc::files";

// Connect to the database at that URL. Properties prop = new Properties(); con = Driver.connect(url, prop);

// Execute a SELECT statement java.sql.Statement stmt = con.createStatement(); java.sql.ResultSet rs = stmt.executeQuery("SELECT a, b, c, d, key FROM Table1");

} catch (java.sql.SQLException E) {}