aspose file tools*
The moose likes JDBC and the fly likes Problem in fetching the single field Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Problem in fetching the single field" Watch "Problem in fetching the single field" New topic
Author

Problem in fetching the single field

Dhiraj Srivastava
Ranch Hand

Joined: Aug 29, 2001
Posts: 49
hello
I am developing a banking application ms-access as back end for my account no field in account opening form i have to fetch the last account no from the table in access but i am enable to do so
please note again i have to select a table then account no coloumn by record set then the last entry from that coloumn
I hope that u people can understand
Thanks in advance
Dhiraj
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

First of all, why are you using MSAccess for a banking app!?
If you are using autonumber for your account number then why don't you use a SQL query:
"select max(account) from banking_table"
or add a timestamp field and use something like
"select account from banking_table where timestamp_field = (select max(timestamp_field) from banking_table"
not sure I totally understand your problem
Jamie
Dhiraj Srivastava
Ranch Hand

Joined: Aug 29, 2001
Posts: 49
thanks jamie
I will try this and then mail
dhiraj
Dhiraj Srivastava
Ranch Hand

Joined: Aug 29, 2001
Posts: 49
Jamie
Can I select the max entry by using record set but the return type is String then i have to convert it into the integer could u please guide me
Thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem in fetching the single field