doubt in return statement

hai....i am using simple java file with MS-Access db...i want to know whether is it possible to return more than one value using return stmt?

for example in bank database after user created his account ...it has to return his new account no and pin no...plz...help me...

Thanks in advance...

[310 byte] By [MeenaMahalingama] at [2007-11-27 5:13:21]
# 1
return a String array
masijade.a at 2007-7-12 10:34:50 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2

Gently use DTO's.

public class Account {

private Long id;

private String name;

private Integer pin;

// + getters + setters

}

Account account = null;

if (resultSet.next()) {

account = new Account();

account.setId(new Long(resultSet.getLong("id")));

account.setName(resultSet.getString("name"));

account.setPin(new Integer(resultSet.getInt("pin")));

}

return account;

BalusCa at 2007-7-12 10:34:50 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3
Thanks a lot....i got it.....once again thank u very much.....
MeenaMahalingama at 2007-7-12 10:34:51 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...