Skip to Content
0
Former Member
Jul 14, 2006 at 02:11 PM

how to access a table contents using datasource

16 Views

hi to all Gurus,

I could not able to aceess table contents through a datasource.

How could i assign a datasource to some database.

i have to use oracle database. Here is my code.

InitialContext context = new InitialContext();

DataSource ds = (DataSource)context.lookup("jdbc/SAPTEDDB");

con=ds.getConnection();

//Upto here everything works fine now,

rs1=con.createStatement().executeQuery("");

i have to create table using this datasource

Please tell me how i will assign tables to this datasource.

Please help me.

Thanks and Regards;

Pankaj Kumar