I am trying to connect an android app to a derby database on a pc to get data form that. For this i googled a database specially for this purpose i.e. Awake SQL. I tried the following code for the connection to the derby database. The code is of a function which is called on the button click of the android app.
public void getData(View view)
{
new Thread()
{
public void run()
{
String url = "jdbc:derby://localhost:1527";
String username = "user";
char [] password = {'p', 'a', 's', 's', 'w', 'o', 'r', 'd', '1'};
try
{
Connection connection
= new AwakeConnection(url, username, password);
}
catch(Exception e)
{
System.out.println(e);
}
}
}.start();
}
Actually this code was given in the user guide of Awake SQL. When i run the above code i get the debugging mode of the eclipse. I cant get any error in the console. I am not sure if i am doing it right or not. I am still unable to connect the database for the android app.
I don't see Derby listed as a supported database at http://www.awake-sql.org/