Able To generate Tree But Cant No Of pages Urgent Help Please

From: jawwad (jawwad_33_at_yahoo.com)
Date: 01/28/04


Date: 27 Jan 2004 22:07:45 -0800

Hello;
After a long time l i am able to generate Tree from database using
recursivly..But When the no of messages will becaome greater than 10
,i want to display them on other pages from 10 to onwards.
Can any body please write pseudo code for.Here is code for jsp
tree.(Table Is products(id,pid,lev,name))Hope will be use ful for
others also.Thanks In advance.

<%@ page import="java.util.*,java.sql.*,java.lang.*,oracle.jdbc.driver.*"%>
<%
Statement stmt = null;
String query = "";
Connection conn=null;
try{
//Conection For Datvase
Class.forName("oracle.jdbc.driver.OracleDriver");
conn = DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:ORCL","scott","tiger");
stmt=conn.createStatement();

//Get Top Level IDS For eg c and d drive
ResultSet RS=stmt.executeQuery("Select id from products where pid=0");
Vector vpid=new Vector();
while(RS.next())
vpid.add(new Integer(RS.getInt("id")));//Put it into vector

//Now Select all ids which have childerens
RS=stmt.executeQuery("Select distinct pid from products where
pid!=0");
Vector allpid=new Vector();

//Put In The Vector
while(RS.next())
allpid.add(new Integer(RS.getInt("pid")));

Iterator i=vpid.iterator();

//Iterate Over Root Ids
while(i.hasNext()){
Integer toppid=(Integer)i.next();
method(toppid.intValue(),allpid,stmt,out);



Relevant Pages

  • Re: New IDS Server: 32 or 64bit?
    ... we've been running IDS 7.31 engine on a Linux machine for over ... to IDS 10 on a newmachine and have to decide whether to stay at 32bit ... platform supports both 32bit and 64bit versions of SuSE SLES 10. ... for the database chunks. ...
    (comp.databases.informix)
  • Problems reverting IDS 10 to 9.4
    ... production database servers. ... After make a go at IDS 10 we have found at least one ... fault BTW (I don't want anyone thinking that Informix ... This reversion proved to be a difficult task since ALL ...
    (comp.databases.informix)
  • RE: need your help,thanks
    ... My experience has been with the ISS products and this has a database ... False positives take a long time to tune out of your system, ... essential premise of the area of "response mechanism of IDS" that I want ...
    (Focus-IDS)
  • VBA Codes for User IDs and Passwords
    ... permissions. ... All of the six users have Windows User IDs. ... Dim dbs As Database, rs As Recordset, tdfAccess As TableDef ...
    (microsoft.public.access.forms)
  • RE: Invalid authorization specification (SQL-28000)
    ... Do you mean in the database? ... both Unix IDs are using the same ... Subject: Invalid authorization specification ... If you are not the intended recipient, ...
    (perl.dbi.users)