I have this Java file below which I want to execute inside a Jsp page how
should I modify it or make a bean to display this in Jrun 3.0.

Bert

>import java.sql.*;
>class MyExample {
>public static void main(String[]args) {
>       Connection conn = null;
>       try {
>               Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
>               conn = DriverManager.getConnection("jdbc:odbc:company");
>               Statement stmt = conn.createStatement();
>               String query = "Select * from Company_info";
>               ResultSet rs = stmt.executeQuery(query);
>
>               while (rs.next() )
>               System.out.print(rs.getString(1) + ""+
>               rs.getString(2) + ""+
>               rs.getString(3));
>       }catch(Exception e) {e.printStackTrace(System.err);}
>       finally{
>               try{
>                       conn.close();
>               }catch(Exception e) {e.printStackTrace(System.err);}
>       }
>}
>}


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to