Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_jsp thread: Message Board!!!!!


Message #1 by "Pallavi Mahajan" <paluindian@r...> on 10 Apr 2001 22:50:35 -0000
Hey All Sasi, Prashant, Roy, Takuya,Ashok ,Syde,Shailesh
thanks a lot for the Help.
It worked!
HEy now I've to do my project and you know what ?I'm askedto do 
messageboard like this JSP board!
I'm kinda excited!
Any suggestions for that?How should I proceed?
Please replly me with suggestions!  
Thank you all.I appreciate reply from Sasi,she is the only female member 
of the group! thank u sasi and all.
Bye
Pallavi

------------- Original Message --------------
"Roy Ngan" <kkngan@n...> wrote:
To:"Pro_JavaServer_Pages" <pro_jsp@p...>
From:"Roy Ngan" <kkngan@n...>
Date:Tue, 10 Apr 2001 10:48:40 +0800
Subject:[pro_jsp] Re: Accessing data in Table,Please helpme out!

<%=result> should be <%=result%>

Roy Ngan


----- Original Message -----
From: "Pallavi Mahajan" <paluindian@r...>
To: "Pro_JavaServer_Pages" <pro_jsp@p...>
Sent: Tuesday, April 10, 2001 7:41 AM
Subject: [pro_jsp] Re: Accessing data in Table,Please helpme out!


> Hey Takuya,
> No itsnot SQL question,I have given you code , that accesses data form the
> Emlployess tablebut I want to show that accesses data in tabular form.
> Representing data in table,how can I do that?
> I'mgiving u here the codeI'm trying for,please see the code and tellme
> corrections needed
> here we go.....
>
>
>
> <html>
> <body>
> <%@ page language="java"  import="java.util.*"%>
> <%@ page import="java.awt.*"%>
> <%@ page import="java.sql.*"%>
>
> <%
> try{
> %>
> <%
> Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
> Connection
con=DriverManager.getConnection("jdbc:odbc:NorthWindODBC","admin","admin");
> Statement stmt=con.createStatement();
> ResultSet rs= stmt.executeQuery("Select * from Employees");
>
> while(rs.next()) {%>
> <%
> String result=rs.getString("LastName");
> String result1=rs.getString("FirstName");
> %>
>
> <%=result%><BR>
> <%=result1%><BR>
>
>
>
> <table width=90% align=center>
> <tr><td width=25% bgcolor="#DACCAD" height="24" valign="center"
> align="left"><b><font size="1" face="Verdana" color="#800000"> 
> FirstName</font></b></td>
> <td width=25% bgcolor="#DACCAD" height="24" valign="center"
> align="left"><b><font size="1" face="Verdana" color="#800000"> 
> LastName</font></b></td></tr>
>
> <tr><td width=25% bgcolor="#DACCAD" height="24" valign="center"
> align="left"><b><font size="1" face="Verdana"
> color="#800000"> <%=result1%></font></b></td>
> <td width=25% bgcolor="#DACCAD" height="24" valign="center"
> align="left"><b><font size="1" face="Verdana"
> color="#800000"> <%=result></font></b></td></tr>
> </table>
>
> <%
> }
> rs.close();
>
> }//end the try
>
> catch(Exception e){
> System.out.println(e);
> }//end the catch
> %>
>
> </body>
> </html>
>
>
> Error in this code is "Missing term" dont know whatsss that. SO please
help me.
> bye and thanks for reply.
> Pallavi
>
> ------------- Original Message --------------
> "Takuya Matsumoto" <takuya@e...> wrote:
> To:"Pro_JavaServer_Pages" <pro_jsp@p...>
> From:"Takuya Matsumoto" <takuya@e...>
> Date:Mon, 9 Apr 2001 23:59:15 +0100
> Subject:[pro_jsp] Re: Accessing data in Table,Please helpme out!
>
> Hi there,
>
> It seems like you are asking an SQL question.
> If you want to have an overall understanding of SQL, have a look at
> http://www.sqlcourse.com/.
> Else you could ask a specific question, then we may be able to help.
>
> Cheers,
>
> Takuya
>
>
> -----Original Message-----
> From: Pallavi Mahajan [mailto:paluindian@r...]
> Sent: Monday, April 09, 2001 10:21 PM
> To: Pro_JavaServer_Pages
> Subject: [pro_jsp] Re: Accessing data in Table,Please helpme out!
>
>
> Hey AShok,
> thanks for the reply but I could run that code .
> Now I want to know what should I do to access the data in table. I wanna
> represent the accessed data in table. How should I modify the code?
> Please reply me ASAP if you can.
> Thank u once again
> Pallavi
> ------------- Original Message --------------
> ashok sahay <ashok_sahay@y...> wrote:
> To:"Pro_JavaServer_Pages" <pro_jsp@p...>
> From:ashok sahay <ashok_sahay@y...>
> Date:Mon, 9 Apr 2001 02:25:49 -0700 (PDT)
> Subject:[pro_jsp] Re: Accessing data in Table,Please helpme out!
>
> Hi
>
> What exactly u want modify in this code.
>
> I think this will work fine.
> regds.,
>
> ashok
>
> --- Pallavi Mahajan <paluindian@r...> wrote:
> > Hi freinds ,
> > can anybody tell me howtoaccess the data in table???
> > please tell me how to modify the following code
> >
> >
> > <html>
> > <body>
> > <%@ page language="java"  import="java.util.*"%>
> > <%@ page import="java.awt.*"%>
> > <%@ page import="java.sql.*"%>
> >
> > <%
> > try{
> > %>
> > <%
> > Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
> > Connection con=DriverManager.getConnection
> > ("jdbc:odbc:NorthWindODBC","admin","admin");
> > Statement stmt=con.createStatement();
> > ResultSet rs= stmt.executeQuery("Select * from
> > Employees");
> >
> > while(rs.next()) {%>
> > <%
> > String result=rs.getString("LastName");
> > String result1=rs.getString("FirstName");
> > %>
> >
> > <%=result%><BR>
> > <%=result1%><BR>
> > <%
> > }
> > rs.close();
> >
> > }//end the try
> >
> > catch(Exception e){
> > System.out.println(e);
> > }//end the catch
> > %>
> >
> > </body>
> > </html>
> >  Please tell me the solution.
> > bye
> > Pallavi


  Return to Index