From: Administration <admin@isorintrade.ca>
To: pgsql-interfaces@postgresql.org
Subject: SQL Error JDBC
Date: Tue, 23 Feb 1999 22:36:42 -0500
Message-ID: <36D373C9.CFFF0BCA@isorintrade.ca> (raw)
I have postgresql running in linux on a network, and I have a sample
program in windows. When I run the following
java -classpath .;c:\jdk1.2\lib\postgresql.jar test
I get this error
sqlexception: no suitable driver
Any ideas??
Henry
Here's my code(i'm pasting it because it's short:)
---------------------------------------------------------------------------------------
import java.sql.*;
public class test {
public static void main(String args[]) {
String url = "jdbc:postgres95://isorintrade.ca:5432/ra";
Connection con;
String createString;
createString = "create table COFFEES " +
"(COF_NAME VARCHAR(32), " +
"SUP_ID INTEGER, " +
"PRICE FLOAT, " +
"SALES INTEGER, " +
"TOTAL INTEGER)";
Statement stmt;
try {
Class.forName("postgresql.Driver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
}
try {
con = DriverManager.getConnection(url, "postgres",
"feb_1b42");
stmt = con.createStatement();
stmt.executeUpdate(createString);
stmt.close();
con.close();
} catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
}
}
}
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: admin@isorintrade.ca
Subject: Re: SQL Error JDBC
In-Reply-To: <36D373C9.CFFF0BCA@isorintrade.ca>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox