JDBC Error

From: "Ing(dot) Jhon Carrillo" <jdigital(at)cantv(dot)net>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: JDBC Error
Date: 2005-01-21 13:57:01
Message-ID: 007f01c4ffc1$16642790$1400a8c0@tgusta2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Dear friend,

I want to create a conection to postgreSQL database with "forte for java 4" and this returns an error message:

************************************************************
Driver cargado
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:532)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at Prueba.main(Prueba.java:26)

**************************************************************

this is the code:

*************************************************************************************
import java.sql.*;

public class Prueba
{
public static void main(String ar[])
{
try
{
String driver="org.postgresql.Driver";
Class.forName(driver);
System.out.println("Driver cargado");

String url="jdbc:tbase://192.168.0.20:5432";

Connection conn=DriverManager.getConnection(url,"postgres","internal");
System.out.println("conectado");

//Class.forName("org.postgresql.Driver");

}catch(Exception e)
{
e.printStackTrace();
}
}

}

please help me,

thank

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2005-01-21 14:42:01 Re: JDBC Error
Previous Message Kris Jurka 2005-01-21 10:29:52 Re: Documentation for jdbc escapes