wood burning stoves 2.0*
The moose likes JDBC and the fly likes Unable to connect Postgres useing unixODBC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Unable to connect Postgres useing unixODBC" Watch "Unable to connect Postgres useing unixODBC" New topic

Unable to connect Postgres useing unixODBC

Nagurva Reddy

Joined: Jul 10, 2001
Posts: 7
i am working on Redhat Linux 7.0. I have installed PostgreSQL and unixODBC in my system.I am able to to create DSN through ODBCConfig and i am able to retrive data from the database through odbctest tool.
But i am not able to connect through java program.

import java.sql.*;
public class OdbcTest{
public static void main(String arg[]){
Connection con=DriverManager.getConnection("JDBC:ODB:PostgreSQL","author","coursesafe");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select * from usermaster");
}catch(Exception exp){ exp.printStackTrace();}

i got SQLException NoSutableDriver

pl help me.....

jQuery in Action, 2nd edition
subject: Unable to connect Postgres useing unixODBC
Similar Threads
Upload and Read Excel File
java.net.ConnectException: Connection refused: connect
Tomcat CGI & Database Connectivity
how to connect to db2 using type4 drivers
java.net.ConnectException: Network is unreachable