Created
August 11, 2017 19:12
-
-
Save Horaddrim/825747b4a11c20f536d796b1eaa04744 to your computer and use it in GitHub Desktop.
:D
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static ArrayList<Patio> getArrayListPatios() | |
{ | |
try | |
{ | |
Connection con = ConnectionFactory.getConnection(); | |
// | |
// Cria e executa o comando SQL. | |
// | |
String SQL = "EXEC SPVERITHUS_RetornaPatios 0, '','A' "; // EXECUTA A SP PEGANDO PARAMETROS | |
Statement PS = con.createStatement(); | |
ResultSet rs = PS.executeQuery(SQL); | |
ArrayList<Patio> Patio = new ArrayList<Patio>(); | |
while(rs.next()) | |
{ | |
Patio patioAchado = new Patio(rs.getInt("IdPatio"),rs.getString("NomPatio"),rs.getString("IndExclusao")); | |
Patio.add(patioAchado); | |
} | |
System.out.println(Patio.get(0).getIdPatio() + Patio.get(0).getNomePatio()); | |
return Patio; | |
} | |
catch(Exception Ex) | |
{ | |
Ex.printStackTrace(); | |
} | |
return null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment