File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes How to register a Clob in the dataBase Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to register a Clob in the dataBase" Watch "How to register a Clob in the dataBase" New topic
Author

How to register a Clob in the dataBase

Glen D'cruz
Greenhorn

Joined: Apr 22, 2004
Posts: 15
Hai Everyone,
I want to register a Clob in the database, can any give me an example as to how to go about this.
What I mean is just as we create a table in the database, how do you create a clob.
I frequently get an error message stating "File not found"
Thanks to all
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29261
    
140

Glen,
You can add a clob to a column of a table. I don't know of anyway of just adding a clob.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Glen D'cruz
Greenhorn

Joined: Apr 22, 2004
Posts: 15
Hai Jeanne,
Thanks for your reply. Can you give me an example. The table only accepts int, float, string, but not Clobs. I tried it , but it did not work.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29261
    
140

Glen,
When you create the table, you need to create a column with a clob type. This is a bit database specific. What database are you using?
Glen D'cruz
Greenhorn

Joined: Apr 22, 2004
Posts: 15
Hai Jeanne,
I am using SQLServer, and haven't still figured out a way of doing it.
I will place the whole program for your crutinity on the web this weekend so go through it and modify it if required.
Once again thanks for your time and effort.
[ July 08, 2004: Message edited by: Glen D'cruz ]
Glen D'cruz
Greenhorn

Joined: Apr 22, 2004
Posts: 15
Jeanne,
I have fixed the problem. I used a varchar as the dataType instead of text. The database has accepted it and saved it. I have now to design
a program to retreive the clob.
Thanks once again.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to register a Clob in the dataBase
 
Similar Threads
use of CLOB,help me.
Converting a String to Clob for insert into DB
Concatination 3 columns of VARCHAR2(4000) to return a ResultSet with one column
transform ClobToString, StringToClob with jdk 1.3
Java program to Convert java.lang.String to java.sql.CLOB Object