DB Access Example
PreparedStatement ps;
Resultset rs;
Customer cust;
String countryvar;
countryvar = "Germany";
ps = con.preparedStatement ("select c
from CustomerT c,AddressT a
where c.address = a.id
and a.country = ? ");
ps.setString (1,countryvar);
rs = ps.executeQuery();
while (rs.hasnext () ) {
cust = (Customer) rs.next();
cust.getCreditLimit();
}
field cust Type customer
field countryvar Type String
countryvar := "Germany"
for cust in
select c from Customer as c
where c.address.country = countryvar
do
cust.getCreditLimit()
end for
Java
BOLERO
Vorherige Folie
Nächste Folie
Zurück zur ersten Folie
Graphik-Version anzeigen