I make a connection to an external server SQL Server, but I can only display the data with the following code:
void cursorset (){
java.sql.DatabaseMetaData dm = null;
try {
connection = this.getConnection();
if (connection != null) {
Resultset = result;
private final String statement = "select*from *******";
dm = connection.getMetaData();
Statement select = connection.createStatement();
result = select.executeQuery(statement);
while (result.next()) {
mostrar_datos.append("" +result.getObject(1)+result.getObject(2)+" "+result.getObject(3));
}
result.close();
result = null;
closeConnection();
} else {
mostrar_datos.append("Error: No active Connection");
}
} catch (Exception e) {
e.printStackTrace();
}
dm = null;
}
The problem is I need to display this returned data, on tables with dynamic rows and columns, or alertdialog and I have no idea how to do it.