Ahmet
- Forum posts: 5
Mar 19, 2012, 4:28:10 PM via Website
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.
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.
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.