Subramanian,

On line something in your result set - see below:
  ="+titleid+")
' " ' will error on the Oracle server.  You should use
a single quote - ' - instead of a double there.  You
are also using some other Access notation[s] that is
not compliant with Oracle.  I do not know what you are
using the + signs for.  And, you could easily have
many other errors as well.  You are writing MS Access
to hit an Oracle server.  It would be easier to write
Oracle SQL first.

Wayne Allison



--- subramanian Athimoolam <[EMAIL PROTECTED]>
wrote:
> hi friends,
>
>          i have a problem. i am wroking jsp  using
> Acess it will works
> fine. but the same querey i am ascess through oracle
> it wont work
> properly.the prgrame is like tree view .
>
>
> here i written my code:
> <%
>   String t11 =null;
>   String t12 =null;
>
> try
> {
>   String reh=request.getParameter("newt");
>   String rem=request.getParameter("newm");
>   String asrep1=request.getParameter("asrep");
>   int asrep2=Integer.parseInt(asrep1);
>   String r=request.getParameter("rrepid");
>   String ca=request.getParameter("catid");
>   String titl=request.getParameter("title");
>   int
> p=Integer.parseInt(request.getParameter("pos1"));
>   int
> tit=Integer.parseInt(request.getParameter("titid"));
>   String u=request.getParameter("usname");
>   String msgd=request.getParameter("msgdate");
>   String parid2=request.getParameter("parentid");
>   String Cat=request.getParameter("value");
>
>               int iw=0;
>               int titleid=0;
>               int assrepid1=0;
>               int temptitleid=0;
>               int assrepid=0;
>               int pari11=0;
>               boolean matchfound=true;
>
> Connection conn;
>
>    try
>          {
>             DriverManager.registerDriver(new
> oracle.jdbc.driver.OracleDriver());
>             // Connect to the database
>
>             conn =
>
DriverManager.getConnection("jdbc:oracle:thin:@oracle:1521:portaldb","portaldb","portaldb");
>                 Statement stmt1=conn.createStatement
> (
> ResultSet.TYPE_SCROLL_INSENSITIVE,
> ResultSet.CONCUR_UPDATABLE );
>             conn.setAutoCommit(false);
>             stmt1.executeUpdate("UPDATE msgdf SET
> flag=0");
>                 Statement stmt2=conn.createStatement
> (
> ResultSet.TYPE_SCROLL_INSENSITIVE,
> ResultSet.CONCUR_UPDATABLE );
>             Statement stmt3=conn.createStatement (
> ResultSet.TYPE_SCROLL_INSENSITIVE,
> ResultSet.CONCUR_UPDATABLE );
>
>
-- ***************************************
--
--
--
--
--
               ResultSet
> rs2=stmt1.executeQuery("SELECT
> title,titleid,parentid,assrepid,postion1 FROM msgdf
> where parentid=0 and
> assrepid=0  and catid="+Integer.parseInt(ca)+" and
> titleid="+tit+" and
> status='A' order by titleid");
>                         while(rs2.next())
>                         {
>                   int
> par1=Integer.parseInt(rs2.getString("titleid"));
>                   int maintitleid=par1;
>
>                                   int
> pd=Integer.parseInt(rs2.getString("parentid"));
>                   int
> as=Integer.parseInt(rs2.getString("assrepid"));
>                   int
> po1=Integer.parseInt(rs2.getString("postion1"));
>                   assrepid=par1;
>
>                   %><bgcolor=#EEEEEE><img
> src="folder.gif" border=0>
>                   <A
>
href="reply3.jsp?value=<%=java.net.URLEncoder.encode(request.getParameter("value"))%>&titid=<%=par1%>&asrep=<%=as%>&catid=<%=ca%>&pos1=<%=po1%>&parid=<%=pd%>&pcatid=<%=pcatid%>">
>
> <%out.println(rs2.getString(1)); %></A><br><%
>                    int partitle=par1;
>                    if(assrepid!=0)
>
>                        {
>
>                         do
>                            {
>                                 if(assrepid!=0)
>                                 {
>                                ResultSet
> rs5=stmt2.executeQuery("SELECT title,
> titleid,assrepid,postion1,parentid FROM msgdf where
> flag=0 and
> parentid="+partitle+" and  status='A' order by
> parentid,titleid");
>
> //out.println(" par1 : " + par1 +"<br>");
>                                while(rs5.next())
>                               {
>                                  int
> asr1=Integer.parseInt(rs5.getString("assrepid"));
>                             //out.println(asr1);
>                              int
> po=Integer.parseInt(rs5.getString("postion1"));
>                              int
> ti1=Integer.parseInt(rs5.getString("titleid"));
>                              int
> pari1=Integer.parseInt(rs5.getString("parentid"));
>
>                              String indent;
>                              indent ="&nbsp;&nbsp;";
>
>
>                               if(par1-asr1==0)
>                                           {
>                                                for
> (int i=0; i<=po; i++)
>                                {
>                                      indent=indent +
> " &nbsp;&nbsp;&nbsp; ";
>                                    }
>
>
> assrepid=asr1;
>
>                                     par1=ti1;
>                                out.println(indent);
>                                 %>
>                                <img src="folder.gif"
> border=0>
>                                <A
>
href="reply3.jsp?value=<%=java.net.URLEncoder.encode(request.getParameter("value"))%>&titid=<%=ti1%>&asrep=<%=asr1%>&catid=<%=ca%>&pos1=<%=po%>&parid=<%=pari1%>&pcatid=<%=pcatid%>">
>                                <%out.println(
> rs5.getString(1));
> %></a><br><%
>
>
> stmt3.executeUpdate("UPDATE msgdf SET flag=1
> where titleid="+ti1+" ");
>                                titleid=ti1;
>                                 matchfound=true;
>                                             }
>
>                                     }
>                                if
> (matchfound==false)
>                                 {
>                                  assrepid=0;
>
> titleid=par1;
>                                           par1=0;
>
>                                  }
>
>                                 }
>
>                      else
>                                         {
>
>                                ResultSet
> rs6=stmt2.executeQuery("SELECT
> titleid,assrepid,flag,parentid from msgdf where
> titleid in (select
> distinct(assrepid) from msgdf where
> titleid="+titleid+")and  status='A' " );
>                                while(rs6.next())
>                                                   {
>
>
>    int
> titl2=Integer.parseInt(rs6.getString("titleid"));
>                                         int
>
parentid=Integer.parseInt(rs6.getString("parentid"));
>                                             int
> partitleid=titl2;
>
>            ResultSet rs9=stmt2.executeQuery("SELECT
> title,
> titleid,assrepid,postion1,parentid FROM msgdf where
> flag=0 and
> parentid="+partitle+" and  status='A' order by
> parentid,titleid");
>
>    while(rs9.next())
>
>            {
>
>                                          int
>
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
http://invites.yahoo.com/

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to