arunkumar hk

Greenhorn
+ Follow
since Mar 03, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by arunkumar hk

Hi
I would be thankful if anyone could send me some sample examples/ hints of how do u convert the java.lang.String to java.sql.Clob.
Thanks in advance.
Arun.
Hi,
You can execute this query before creating or dropping the table. Based on the returned value, either create or drop the table.
select tname from tab where tname ='XYZ';
if the result set contains rows then the table exists else table does not exists.

rgds
arun.
A direct insert into the CLOB field does not work if the data exceeds 4000 characters.
Use the DBMS_LOB pacakage to access and manipulate the (C)LOB data.
The feature of loading data directly from varchar2 to a CLOB field using an INSERT statement is not available in 8.0.x and 8.1.5. This feature is available in 8.1.6 and later versions.
rgds
arun.
Hi,
Thx for the reply, I have set the classpath, but still the problem exists it gives as
java.sql.SQLException: No more data to read from socket
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:411)
at oracle.jdbc.ttc7.TTCInBuffer.getByte(TTCInBuffer.java:94)
at oracle.jdbc.ttc7.TTIMsg.unmarshalSB1(TTIMsg.java:1085)
at oracle.jdbc.ttc7.O3log.receive2nd(O3log.java:603)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:168)
at oracle.jdbc.driver.OracleConnection.<init> (OracleConnection.java:103)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:148)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at demo.main(demo.java:12)
thx and rgds
arun.
Hi,
I have a java program code is as below

import java.sql.*;
import java.io.*;
class demo
{
static Connection Con;
public static void main ( String [] str) throws Exception
{
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
Con = DriverManager.getConnection("jdbc racle:thin:@192.20.200.99:1521:demo","scott","tiger");
Statement stmt = Con.createStatement();
ResultSet rs = stmt.executeQuery("select * from tab");
while(rs.next())
{
System.out.println(rs.getString(1));
}
}
catch( Exception e)
{
e.printStackTrace();
}
}
}
while executing i am getting the below error mesg, i have set the classpath and path correctly, pls tell the solution.

java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at demo.main(demo.java:11)
Press any key to continue . . .

rgds
arun.