🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.database
Article #286

Re: Inserting a BLOB in Oracle database

#286
From: Paul Nichols (TeamB)
Date: Sat, 04 Feb 2006 09:34
23 lines
1550 bytes
Roger Boisjoli wrote:

> I am using JBuilder with Sybase EAServer (Jaguar) to access an Oracle 8i
> dtabase and need to insert images into a Blob.
> 
> I have the following code:
> 

I do not know about Sybase, but in Oracle, would have to use the Oracle Blob
type and tyupecast it back to a java.sql.Blob type

for instance

  oracle.sql.Blob blob= (oracle.sql.Blob) rs.getBlov("SomeColumnName");
   
  //inserting back
   ps.setBlob(1,java.sql.Blob)blob);


Another thing,

To get a blob open for access, in Oracle, you need to do a "Select for
Update". This one drove me nuts, the first time I attempted it.
Technical Details
Message-ID: <43e5c39e@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!oleane.net!oleane!grolier!194.74.65.66.MISMATCH!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <43E4B77D.E8371F85@netscape.net>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1073da,8a91b04e7647579
X-Google-Attributes: gid1073da,public
X-Google-Language: ENGLISH,ASCII-7-bit
Message-ID: <43e5c39e@newsgroups.borland.com>
From: "Paul Nichols (TeamB)" <paul@comp.net>
Subject: Re: Inserting a BLOB in Oracle database
Newsgroups: borland.public.jbuilder.database
Reply-To: paul@comp.net
Date: Sat, 04 Feb 2006 04:34:16 -0500
References: <43E4B77D.E8371F85@netscape.net>
Lines: 25
Organization: Team B
User-Agent: KNode/0.8.0
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
NNTP-Posting-Host: 70.34.189.24
X-Trace: newsgroups.borland.com 1139131294 70.34.189.24 (5 Feb 2006 01:21:34 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!oleane.net!oleane!grolier!194.74.65.66.MISMATCH!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail