Vamsi,

       Thanks!   Based upon your message I changed my code to:

javax.naming.InitialContext ctx = new javax.naming.InitialContext();
        javax.sql.DataSource ds = (javax.sql.DataSource)ctx.lookup("java:comp/env/jdbc/cl");
        java.sql.Connection con = (java.sql.Connection)ds.getConnection();

It now appears to work.   

Thanks again,
Bob

On Sep 3, 2006, at 11:28 PM, Vamsavardhana Reddy wrote:

Hi Bob,

You will need to add a cast in the second line of code above.  It should look like the following:

javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup("java:comp/env/jdbc/cl");

Vamsi

Reply via email to