Two Laptop Bag
The moose likes JDBC and Relational Databases and the fly likes Problem in choosing one field Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Problem in choosing one field" Watch "Problem in choosing one field" New topic

Problem in choosing one field

Dhiraj Srivastava
Ranch Hand

Joined: Aug 29, 2001
Posts: 49
I am developing banking application MS--Access as back end for my account no. field i have to run a query in to table of access for getting the last account so the program may start from the next one but i am enable to do so can any one please help me
note once again i have to select table in to which account no is a record set and from that set i have to select the last one then save that no into a integer of String type in code
thanks in advance
venugopal askani

Joined: Aug 20, 2001
Posts: 16

Hey Dhiraj,
If u r database is having the account_no as integer and u need to take the last account no then do this query
select max(account_no) from table no..
then increase the no by one and then store it in string..
Hope this is what u want.....
Venugopal Askani
Dhiraj Srivastava
Ranch Hand

Joined: Aug 29, 2001
Posts: 49
Thanks Mr. Venugopal
Ur solutions works but i still have one problem when i register only one and close the problem it's ok but when in continuty account no. remains same can u please help me
Thanks again
I agree. Here's the link:
subject: Problem in choosing one field
jQuery in Action, 3rd edition