PostgreSQL connection error

  • Replies:7
Ahmet
  • Forum posts: 5

Mar 19, 2012, 4:28:10 PM via Website

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;
}

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.

Reply
Ahmet
  • Forum posts: 5

Mar 20, 2012, 8:58:19 AM via Website

İ forgat to write 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.

Reply
Eric McBride
  • Forum posts: 1,790

Mar 20, 2012, 2:32:01 PM via Website

Sounds like you need some developer advice. Have you posted your question on XDA Developers?

Reply
Ahmet
  • Forum posts: 5

Mar 20, 2012, 2:32:48 PM via Website

no i havent

Reply
Eric McBride
  • Forum posts: 1,790

Mar 20, 2012, 2:36:03 PM via Website

Is probably a good idea. That site is full of some of the most talented Android developers in the world.

Reply
Ahmet
  • Forum posts: 5

Mar 20, 2012, 2:40:19 PM via Website

i looked that side but i couldnt find any question about adroid programming and adroid coding.

Reply
Eric McBride
  • Forum posts: 1,790

Mar 20, 2012, 3:56:25 PM via Website

You just have to go to the Android development section of the site and post your own thread with your question. Im sure someone could help.

Reply
Ahmet
  • Forum posts: 5

Mar 20, 2012, 4:02:16 PM via Website

ok i will try:)

Reply