I have defined a few classes, one is a database class. In one of the class , I have written a code which gets me the names present all the rows in form of an array.
Code:
DBContact info = new DBContact(this);
info.open();
String data[] = info.queryAll();
info.close();
In another class , I want all the details of a particular name clicked.
Code:
DBContact getdetails = new DBContact(this);
getdetails.open();
String returnedname = getdetails.getName(l);
String returnedpphone = getdetails.getPphone(l);
String returnedhphone = getdetails.getHphone(l);
String returnedophone = getdetails.getOphone(l);
getdetails.close();
Assuming that I am passing the parameter correctly , am I doing it right ?? or am I defining two databases.
I am new to programming, all help is very much appreciated.