GUYS!! Is there any way to write BLOB's 4K using Oracle thin driver

I've been trying for 3 days to do that but nothing worked ...
Not
setBinaryStream(x, new ByteArrayInputStream(anArrayWith10KBytes), anArrayWith10KBytes);
nor setBytes(x, myArray), or setObject(x, myArray).
Is there any way to store Blobs to Oracle 8.1.6 using the thin driver ????????????
Please help ... cause I really need it !!!
Best regards,
Stefig

Hi Stefig
Following code help you to store the files >4k in BLOB column in Oracle database
test is a table in which TEST is BLOB column
String url = "jdbc:oracle:thin:@.....";
String user = "user name";
String password = "password";
Connection conn = null;
PreparedStatement aQuery = null;
ResultSet rs = null;
try
Class.forName("oracle.jdbc.driver.OracleDriver");
conn = DriverManager.getConnection(url,user,password);
conn.setAutoCommit(false);
Statement stmt = conn.createStatement();
stmt.execute("insert into test values (EMPTY_BLOB())");
rs = stmt.executeQuery("select TEST from test");
rs.next();
BLOB blob =((OracleResultSet)rs).getBLOB(1);
File f = new File(filename);
FileInputStream io = new FileInputStream(f);
OutputStream os = blob.getBinaryOutputStream();
int size = io.available();
byte[] buffer = new byte[1024];
int length=0;
while((length=io.read(buffer)) != -1)
os.write(buffer,0,length);
io.close();
os.close();
stmt.execute("commit");
catch()
Good Luck
From
Sachin

Similar Messages

  • Is there any way to generate Gantt chart by using oracle 9iDS?

    Is there any way to generate Gantt chart by using oracle 9i reports builder
    Can you please send me the link or more information on oracle 9iDS.
    Thanks

    Hi,
    Oracle9iDS itself doesn't support creating Gantt charts. The option oyu have is to use Oracle Graphics 6i, because there is no Graphics in 9i, and configure it to run with Oracle9i Forms. There exist a whitepaper at otn.oracle.com/products/forms that explains how to make Graphics 6i work with Forms 9i.
    Frank

  • Is there any way to write to a socket after shutting it down?

    Guys is there any way to write to a socket after using the shutdownOutput() method?
    I get this complain at runtime
    java.net.SocketException: Cannot send after socket shutdown: socket write error

    Your question embodies a contradiction in terms. Shutting down the socket means that you're telling the other end there is no more data. So you can't send more data. And even if you could, the other end wouldn't read it, because it would think it had already reached end of stream. Because that's what you told it.
    If you don't want HTTP keep-alive, turn it off via the appropriate HTTP header.
    You should be using HttpURLConnection for this, not a Socket. That takes care of your reading problem: it knows how to process the content-length header.

  • Is there any way to write a Java prg without main()

    I would like to know Is there any way to write a Java program without using main() function.

    > i am unable to execute the program ..............i
    think there must be a main method through with the
    program starts
    The program can be compiled and run. After running it, you'll see "They'll kill you for that" followed by something like "java.lang.NoSuchMethodError: main" and finally someone with a big Volvo will burst into your room and runs you over.

  • Is there any way to get around having to use iDVD to burn DVD?

    Is there any way to get around having to use iDVD to export FCE to DVD?
    I've been trying to burn a FCE2 sequence to DVD. A friend of mine told me all I had to do was put a blank DVD in, click on the icon on the desk top, export the sequence to Quicktime and drag the QT sequennce into the DVD icon and click burn.
    Well something happened! But there's nothing on the DVD!! What am I doing wrong? I loathe iDVD. i don't want to author. I just want to burn the project on a DVD. Please advise. Thanks.
    Chuck
    iMAC 1.25 GHz PowerPC G4 Mac OS X (10.3.1)
    iMAC 1.25 GHz PowerPC G4   Mac OS X (10.3.1)  

    If you export a sequence at full resolution to can burn it onto a DVD as a data DVD, but this is for transportation purposes only. At full resolution the DVD, especially as it fills up, will not have sufficient throughput to sustain good playback of the material. That's why the material is encoded into MPEG-2 for DVD authoring. If you want to make a DVD for set-top playback it has to be authored to include the DVD format structure. There is no way around that. If you don't like iDVD, take a look at Final Cut Studio, you might prefer DVD Studio Pro. Or you might what to look at Roxio's Toast. It has basic authoring capabilities. Personally I don't think direct playback hardware solutions (except for seriously expensive ones) produce acceptable quality, but that's just me.

  • Is there any way to search for a term using the Firefox search field, and have the results automatically open in a new tab?

    Is there any way to search for a term using the Firefox search field, and have the results automatically open in a new tab? When there was support for Google Toolbar, I was able to do this; now, whenever I want to search for something, I have to open a new tab to do it, and cut-and-paste my search into the search field in the new tab. I used to be able to highlight, drag, and drop something into the search field and have it automatically open in a new tab. This is enough for me to switch to Chrome . . .

    Set a preference to have searches from the Search Bar (upper right) automatically open all searches in a new tab
    #type '''about:config''' in the URL/Location/Address bar and press the Enter key
    #if you see a warning, accept it (promise to be careful)
    #Filter = '''browser.search.openintab'''
    #in the lower panel, double click the item (or right-click and choose "Toggle") to change the value to "true"
    #close the about:config tab and test
    #See:
    #*For help with opening/using about:config, also see: http://kb.mozillazine.org/About:config
    #*Also see: http://kb.mozillazine.org/About:config_entries (click on "Browser", scroll down to browser.search.openintab)
    '''Search Bar''': http://support.mozilla.com/en-US/kb/Search+bar
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    About Google toolbar............
    Google decided that they will no longer produce the Google Toolbar for Firefox 5 and newer version. It is best to move on to other alternatives than to try any "hacks" to the toolbar that may or may not perform in the future. Future versions of Google toolbar will only work with IE7-9. Google Toolbar is not available on any other browser, even Google's own browser.
    *http://googletoolbarhelp.blogspot.com/2011/07/update-on-google-toolbar-for-firefox.html
    *https://support.mozilla.com/en-US/kb/google-toolbar-not-compatible-firefox?s=google+toolbar&r=0&as=s
    *http://www.google.com/support/toolbar/bin/answer.py?answer=1342452&topic=15356%29
    *Google Toolbar 8 FAQ (IE only): https://www.google.com/support/toolbar/bin/answer.py?hl=en&answer=1111588
    '''''To access your Google Bookmarks visit''''' www.google.com/bookmarks.
    Alternatives:
    *http://kb.mozillazine.org/Using_Google_Toolbar_features_without_toolbars
    *https://addons.mozilla.org/en-US/firefox/addon/googlebar-lite/
    *https://addons.mozilla.org/en-US/firefox/addon/gbookmarks-google-bookmarks-fo/

  • Only an exclamation point shows up when I click a thumbnail in my iphoto folder. Is there any way to recover these photos by using the thumbnails?

    Only an exclamation point shows up when I click a thumbnail in my iphoto folder. Is there any way to recover these photos by using the thumbnails? Please help. Thanks!

    That exclamation mark is displayed when iPhoto cannot link to the original file.  First make sure you are running a "managed" library by checking iPhoto's Advanced preference pane to make sure the checkbox to copy files into the library during import is checked.
    Click to view full size
    If it is checked you can try the following: make a temporary, duplicate copy of the library and apply the two fixes below in order as needed:
    Fix #1
    Launch iPhoto with the Command+Option keys held down and rebuild the library.
    Select the options identified in the screenshot. 
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    Download iPhoto Library Manager and launch.
    Click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
    Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option
    In the next  window name the new library and select the location you want it to be placed.
    Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments but not books, calendars or slideshows. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    OT

  • Recorded a video in portrait mode and want to switch it to landscape mode is there any way else to do it without useing quicktime pro....hope apple fixes this in ios 7 the video should come out in landscape regardless of the way you hold your phone

    is there any way else to do it without useing quicktime pro....hope apple fixes this in ios 7 the video should come out in landscape regardless of the way you hold your phone or if you start in portrait and go into landscape while recording

    You used the data.  Verizon can not see what it was sued for.  However your phone can see whats apps used the data.  go to settings-data usage- there will be a place that says data usage cycle.  line the dates up with your cycle.  then there will be a bar graph below that   extend bother white bars one all the way to the left and one all the way to the right.  after those are extended below that will be a list of apps,  there should be one that used over 2 gb and that will show you what app used that data in her purse

  • With just ONE inatentive sweep of my finger one page of my note was disappeared! Is there any way it can be recovered without using the help of iCloud backup?

    1. With just ONE inattentive sweep of my finger one page of my note disappered. Further more, the same page in my iPad was deleted automatically too! How could this happen? Is there any way it can be recovered without using the backup feature from iCloud? The data is vey important to me?
    2. I havn't connect the power code to my iPad yet, the backup copy in the iClout was before the accident as I checked in iPad. Is there any way that I could open my notes in iCloud backup so that I can copy the missing page and move back to my iPad and iPhone?
    Thanks a lot for any help!
    Xueyu

    Sorry, no. The only way to restore this note is to restore from a backup that contains it.

  • Is there any way to find out a Tcode used by user in a particular interval.

    Hi
    Is there any way to find out a Tcode used by user between 10/8/2009 to 31/8/2009, in production?
    Satish.

    Yes i have been trying SE16N only. But i am unable to pull data based on dates (Aug/8 to Aug 21)... its showing list of users who have accessed the tcodes directly for entire month....
    Se16n ->Export mode->month->08/2009
      --->     Transacction profile -->Standard
    I want to find out only users who have used a particular tcode during those dates.....in august..
    Satish

  • Is there any way to upgrade RHEL 5.8 to Oracle Enterprise Linux 6.5 ?

    Is there any way to upgrade RHEL 5.8 to Oracle Enterprise Linux 6.5.
    [root@]# cat /etc/redhat-release
    Red Hat Enterprise Linux Server release 5.8 (Tikanga)

    Hi,
    Unfortunately, there is no such upgrade path from RHEL 5 to OL 6. Make a bakcup of your current RHEL and do a fresh install.
    how to upgrade from oracle linux 5.8 to 6.5
    Best regards

  • Is there any way to turn off data and use only wi fi

    is there any way to turn off data and use only wi fi, going to a foreign country and do not want to use data but wi fi will be available. I want to be sure to use only wi fi

    Yes there is!
    Simply go into Settings, General, Mobile Data, Turn this off and make sure Data Roaming is also switched off! You can have wifi on and this will no charge your account for the data you use via Wi-Fi!

  • Is there any way to access the App Store using OS10.4.11 on a Mac G4?

    Hi All:
    Is there any way to access the App Store using OS10.4.11 on a Mac G4 (dual 1.42 Ghz, FW800, MDD)?
    Thanks,
    Robert

    No. None of the applications from it will work either.
    (81546)

  • Is there any way to write-enable an NTFS-format WD external Hard Drive ?

    I have a WD Elements external HD unit, 1TB previously formatted NTFS under Windows XP on a PC. I would like to use this HD unit to both read and write data using both the Windows PC and a MacBook Pro. But when connected to the MacBook Pro (USB), the HD unit shows up as Read Only.
    Is there a way to write-enable the HD unit without losing, or having to backup/restore, the mass of data already saved there ?
    I have tried installing NTFS-G3 on the MBP, as suggested elsewhere. Having done so, when I "get information" about the WD unit, the disc format shows as "Windows NT File System (NTFS)" and not NTFS-G3 as expected. Ran chkdsk on the WD under Windows to iron out any problems in the disc's file system. It ran for several hours before completing successfully, but there was no change at all - the unit is still read-only after re-connecting to the MBP.
    Can anyone help out please?

    Why would you expect it to say NTFS-3G? NTFS-3G is just a program that translates the NTFS to something the Mac OS can deal with. It doesn't change the format of the hard drive. The drive is formatted with the New Technology File System (NTFS), not the NTFS-3G file system.
    Were you not able to write to the drive with NTFS-3G installed? Did you install the free version? If so, did you install MacFuse, also? It is required for the free version of NTFS-3G.
    Edit:
    I just plugged in an NTFS drive and I'm guessing what you were looking for was something to indicate what was doing the translation. On mine I get, "Windows NT File System (Tuxera)." So, I think I understand what you meant before. My guess is as I stated above. Make sure you also have MacFuse installed if you are using the free version of NTFS-3G.
    Message was edited by: Barney-15E

  • Is there any way by which I can not use Thunar Sys Tray icon?

    I am using stalonetray in OpenBox in Arch and when I copy-paste or cut-paste files in Thunar, a sys tray icon pops up. I don't want it to pop up.
    Is there any way by which I can make it to not pop up?

    Trilby wrote:
    I haven't used thunar for a while - but I don't remember it ever doing this before.  I just verified that it doesn't here (freshly installed thunar, and cut-pasted, copy-pasted, etc, and I didn't get a tray icon.
    Are you sure this isn't some other tool, like a clipboard manager?  Are their any tooltip popups or menus available on the tray icon and/or what happens when you click the icon?
    No. I use only Thunar. When I hover on the icon it says that "1 file operation running" when a copy-paste or cut-paste operation happens and when I left click and right click on it, it shows the copying window of thunar. The icon shows two small yellow folders placed diagonally. It's the same icon that appears on the file operation progress window of Thunar. I don't know whether Numix has anything to do with the specific icon though.
    Last edited by chosentorture (2015-01-11 00:13:32)

Maybe you are looking for