> Dear friends:
> following code just prints
[quoted text clipped - 21 lines]
>
> waiting for reply.....
Could it be simply that the code is throwing an exception? Wrap it in
a try-catch block...
stixwix - 04 May 2006 09:50 GMT
> Could it be simply that the code is throwing an exception? Wrap it in
> a try-catch block...
Sorry - i didn't read the question properly!
"Ramji" wrote...
> following code just prints
> Connecting to Oracle... & it doesnt prints ....Connected to oracle
> statement.
> I've given the code in try catch block but also it doesn't
> print any exception
> why??
What do you do with the exception you catch?
When caught, the exception doesn't "print itself".
If it happens that you catch an exception, but don't do anything with it
(e.g. print out the stacktrace), you'll not see anything.
Could that be the case here?
> System.out.println("connencting to Oracle....");
>
[quoted text clipped - 5 lines]
> = 1521)))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME =
> testdb)))","test","test");
This seems a bit overkill to supply the whole Net8 configuration file when
working with the thin driver... ;-)
It should suffice with:
DriverManager.getConnection(
"jdbc:oracle:thin:@testserver.com:1521:testdb",
"test", "test");
// Bjorn A