Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / March 2006

Tip: Looking for answers? Try searching our database.

Create new Clob

Thread view: 
zyon2k@gmail.com - 08 Mar 2006 16:13 GMT
hi,
i'm trying to create a new clob to put into a db with
stmt.setClob(column,clobvar)
I'm using sqlserver2005 and jtds connector.

jtds have a class, clobImpl, that implements interface java.sql.Clob,
but its constructor is protected.

How i can create a new clob and then put it to dB?

i know that oracle have a method,
CLOB.createTemporary(conn, false, CLOB.DURATION_SESSION);

that permit to instanziate a new clob.

how i can do with jtds and sqlserver2005?

please help me
thanks to all that will help me
zyon
Daniel Dittmar - 08 Mar 2006 17:00 GMT
> hi,
> i'm trying to create a new clob to put into a db with
[quoted text clipped - 5 lines]
>
> How i can create a new clob and then put it to dB?

- use setString, setASCIIStream or setCharacterStream instead (I guess
the important part is getting the data into the database, not using setClob)
- or create your own Clob implementation (my guess: for inserting data
into the database, only the methods getAsciiStream, getCharacterStream,
getSubString and length would be used, so you could raise SQLException
for anything else. Or you raise SQLException for everything at first to
get an idea which methods are actually called).

Daniel


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.