• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps PostgreSQL connection error

t3mh4

Lurker
Mar 20, 2012
1
0
i wanna create a connection to postgresql with jdbc.i did it with android 2.2 bu i couldt connect with android 3.2. for both application i have used the same methods but it did not connect with android 3.2.Here is the code;
public Boolean CreateConnection()
{
try {
Class.forName("org.postgresql.Driver");
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return false;
}
try {
conn = DriverManager.getConnection("jdbc:postgresql://ip:5432/db","user", "pasword");
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return false;
}
return true;
}
here is the error when i tried to run my application in android 3.2;
"org.postgresql.util.PSQLException: Something unusual has occured to cause the driver to fail. Please report this exception. "

in addition i get the permission in the manifest.xml and i used that jar file:postgresql-8.3-606.jdbc4.jar
thanks for helping me.
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones