File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC 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


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

Problem in choosing one field

Dhiraj Srivastava
Ranch Hand

Joined: Aug 29, 2001
Posts: 49
hello
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
dhiraj
venugopal askani
Greenhorn

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.....
Regards
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
Dhiraj
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in choosing one field