Next() problem?

Hi to everybody,

I am new at Java and of course JSP but i am trying to use Next() method. Whenever i try to use that method in my web application, the page is posted back but always the first row of the data comes up. I can't jump to the second row in the database. But to let you know, i am using netbeans 5.5 to create my project, so i make it by netbeans' GUI so i don't write any code for it, just have Visual Web Pack and just double click to Next() method from palette.

Thanks for the helps.

[521 byte] By [sheriffdaonea] at [2007-11-26 15:17:18]
# 1
You will need to show us the relevent code.
cotton.ma at 2007-7-8 10:57:55 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
Well i don't use any code i mean the ide generates it. I use Netbeans and i just drag and drop the tables into Jtable and in Source page i choose Next() method from the palette. So is there a way for it because when i try to jump to the 2nd. row , it won't. Always the first row comes
sheriffdaonea at 2007-7-8 10:57:55 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3

> Well i don't use any code i mean the ide generates

> it. I use Netbeans and i just drag and drop the

> tables into Jtable and in Source page i choose Next()

> method from the palette. So is there a way for it

> because when i try to jump to the 2nd. row , it

> won't. Always the first row comes up..

How are we supposed to help you exactly?

*****************************

*RINNNNGGGG*

Car mechanic: Hello.

You: Can you help me my car is making a funny noise?

Car mechanic: Well bring it in and I'll take a look.

You: I can't. It's a rental. Can you help?

*****************************

No. Nobody can help you. You will have to post code or not be helped.

cotton.ma at 2007-7-8 10:57:55 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 4

well there is no particular code, ide just creates it and i just drag the table into the jtable from my database and i have a button which is suppose to get to the second row but it always stays in the first row when the page is posted back.. So is it normal or abnormal because as much as i know teh Next() is to get the 2nd. row. but it always gets the 1st. row like when the page is post back the cursor gets to the top again. Sorry for the code thing cuz there is no particular one i mean there is the code which tries to move the cursor

public String button1_action() {

try {

customerDataProvider.cursorNext();

} catch (Exception ex) {

throw new FacesException(ex);

}

return null;

}

sheriffdaonea at 2007-7-8 10:57:56 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 5

<meanie>

> I am new at Java and of course JSP

Maybe you should learn to walk before you run, and ignore JSPs until you can write Java.

> you know, i am using netbeans 5.5 to create my

> project, so i make it by netbeans' GUI so i don't

> write any code for it, just have Visual Web Pack and

> just double click to Next() method from palette.

Autobuilder tools are for when you know what you are doing, but want to do it faster. Not for when you are just starting. Throw NBs in the bin, learn Java using a simple syntax highlighting text editor, and the command line.

</meanie>

Good luck:

[url=http://java.sun.com/docs/books/tutorial/ ]Sun's basic Java tutorial[/url]

[url=http://java.sun.com/learning/new2java/index.html ]Sun's New To Java Center[/url]. Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.

[url=http://javaalmanac.com ]http://javaalmanac.com [/url]. A couple dozen code examples that supplement [url=http://www.amazon.com/exec/obidos/tg/detail/-/0201752808?v=glance ]The Java Developers Almanac[/url].

[url=http://www.jguru.com ]jGuru[/url]. A general Java resource site. Includes FAQs, forums, courses, more.

[url=http://www.javaranch.com ]JavaRanch[/url]. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.

Bruce Eckel's [url=http://mindview.net/Books/DownloadSites ]Thinking in Java[/url] (Available online.)

Joshua Bloch's [url=http://www.amazon.co.uk/exec/obidos/Author=Bloch,%20Josh ]Effective Java[/url]

Bert Bates and Kathy Sierra's [url=http://www.amazon.com/exec/obidos/tg/detail/-/0596004656?v=glance ]Head First Java[/url].

James Gosling's [url=http://www.bookpool.com/sm/0321349806 ]The Java Programming Language[/url]. Gosling is

the creator of Java. It doesn't get much more authoritative than this.

mlka at 2007-7-8 10:57:56 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...