I am unable to connect to the oracle database I tried all the possible ways that are mentioned in the examples/docs ,but I am unable to connect by using thin driver.Can anybody please help me out.If possible write the code.
thakz in advs
Are you trying to use the connection pooling, or is it that you just can't connect at all? n.b, is this a language problem or possibly a db problem?
Below is the weblogic.properties we use to create a connection pool. Remember to include the Oracle jdbc jar file in the weblogic class path. Let me know if this helps.
# Create pool
# Set allow to everybody
# Register as JNDI datasource
Thank u for ur message.
We have a prob now , we are not able to find oracle jdbc jar.
Please guide me where to find it.
And let us know more about weblogic.class.path
Oracle JDBC jar files can be found in the Oracle installation directory:
JDK 1.1.x: %ORA_HOME%\Ora81\jdbc\lib\classes111.zip
JDK 1.2.x: %ORA_HOME%\Ora81\jdbc\lib\classes12.zip
The weblogic class path is specified using the option -Dweblogic.class.path <classpath> when starting the weblogic server
As one of my friend said, u can set weblogic.properties file do things.
Second way is that u can always have ur own connection ,which is sometimes not advisable(I donno why..)
In ur program, import oracle.jdbc.driver.*; package,and do the following..
//Look up for driver name
//Then get the connecton
Connection con = java.sql.DriverManager.getConnection("jdbc:oracle:thin:@10.190.21.5:1521:IFDEV","fstdev","fstdev");
Once u get the con,do manipulations with it.
I think I'm clear.