Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to connect Postgres useing unixODBC

Nagurva Reddy
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.....
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic