BrunoGomes_PT
Power Member
Boas malta,
não tou a conseguir preencher uma textview recorrendo a uma base de dados sql server. Alguem me consegue ajudar? Eis o que tenho no onCreate:
connectionClass = new MainActivity();
text = (TextView) findViewById(R.id.textView4);
Connection con = connectionClass.connectionclass(connectionClass.ut, connectionClass.pw, connectionClass.db, connectionClass.server);
String query = "select text from Org";
try {
PreparedStatement ps = con.prepareStatement(query);
ResultSet rs= ps.executeQuery();
} catch (SQLException e) {
e.printStackTrace();
}
não tou a conseguir preencher uma textview recorrendo a uma base de dados sql server. Alguem me consegue ajudar? Eis o que tenho no onCreate:
connectionClass = new MainActivity();
text = (TextView) findViewById(R.id.textView4);
Connection con = connectionClass.connectionclass(connectionClass.ut, connectionClass.pw, connectionClass.db, connectionClass.server);
String query = "select text from Org";
try {
PreparedStatement ps = con.prepareStatement(query);
ResultSet rs= ps.executeQuery();
} catch (SQLException e) {
e.printStackTrace();
}