How can i put a file into blob(using sun.jdbc.odbc.JdbcOdbcDriver)

Hi
i tried to put a file into blob , but got a problem.....
My environment:windows 2000pro,JBuilder 5.0 enterprise,oracle 8.1.6,(not install oracle jdbc driver )
a part of program(my program is very uglily,if anyone want,later i paste it ba....~_~)
//Statement stmt2=null;
//Resultset rs2;
//opa1 is the blob data
void saveBlobTableToDisk(Connection con) {
try {
stmt2=con.createStatement();
sqlStr2="SELECT * FROM emp3 where id=1004";
rs2=stmt2.executeQuery(sqlStr2);
while (rs2.next()) {
Blob aBlob=rs2.getBlob("opa1");
i got the exception :
" null
java.lang.UnsupportedOperationException
     at sun.jdbc.odbc.JdbcOdbcResultSet.getBlob(JdbcOdbcResultSet.java:4174)
     at test3.Frame1.saveBlobTableToDisk(Frame1.java:48)
     at test3.Frame1.<init>(Frame1.java:26)
     at test3.Application1.<init>(Application1.java:5)
     at test3.Application1.main(Application1.java:8) "
and the windows pop up a messagebox said that(about) my memory "0x09af007f" could not read, error in javaw.exe .
Later i used (ResultSet)getBinaryStream() to solve it. but getBinaryStream() only return a InputStream,so that i can make blob to a file,but i can't make a file to blob using jdbc.....
I am very stupid that installing sun java, oracle jdbc driver etc....(because i must set a lot of thing such as classpath,java_home etc), Can i only use JBuilder to do that ?
Or i must install oracle jdbc driver ?
Thanks.

My guess here is that Sun's JDBC-ODBC bridge doesn't handle the BLOB datatype. Most ODBC drivers don't support that datatype, so I wouldn't expect the bridge to.
Is there a reason that you can't use the Oracle driver?
Justin

Similar Messages

  • How can i put a file into blob using jdbc !?

    Hi
    i tried to put a file into blob , but got a problem.....
    My environment:windows 2000pro,JBuilder 5.0 enterprise,oracle 8.1.6,(not install oracle jdbc driver )
    a part of program(my program is very uglily,if anyone want,later i paste it ba....~_~)
    //Statement stmt2=null;
    //Resultset rs2;
    //opa1 is the blob data
    void saveBlobTableToDisk(Connection con) {
    try {
    stmt2=con.createStatement();
    sqlStr2="SELECT * FROM emp3 where id=1004";
    rs2=stmt2.executeQuery(sqlStr2);
    while (rs2.next()) {
    Blob aBlob=rs2.getBlob("opa1");
    i got the exception :
    " null
    java.lang.UnsupportedOperationException
         at sun.jdbc.odbc.JdbcOdbcResultSet.getBlob(JdbcOdbcResultSet.java:4174)
         at test3.Frame1.saveBlobTableToDisk(Frame1.java:48)
         at test3.Frame1.<init>(Frame1.java:26)
         at test3.Application1.<init>(Application1.java:5)
         at test3.Application1.main(Application1.java:8) "
    and the windows pop up a messagebox said that(about) my memory "0x09af007f" could not read, error in javaw.exe .
    Later i used (ResultSet)getBinaryStream() to solve it. but getBinaryStream() only return a InputStream,so that i can make blob to a file,but i can't make a file to blob using jdbc.....
    I am very stupid that installing sun java, oracle jdbc driver etc....(because i must set a lot of thing such as classpath,java_home etc), Can i only use JBuilder to do that ?
    Or i must install oracle jdbc driver ?
    Thanks.
    D.T.

    My guess here is that Sun's JDBC-ODBC bridge doesn't handle the BLOB datatype. Most ODBC drivers don't support that datatype, so I wouldn't expect the bridge to.
    Is there a reason that you can't use the Oracle driver?
    Justin

  • How can i put back files that were accidentally put into trash

    How can i put back files that were accidentally put into trash.  I'm using Mountain Lion on my Mac Book Pro

    command Z if it was the last thing you did.
    Control (right) click on any item in the trash folder>> Put Back

  • How can i put Jar Files in Java Runtime.?

    HI,
    how can i put jar files in JRE so that they are accessible every where.? is there some way.?
    Regards,
    AA

    Closest you could get to this I think is to explode all your jars into the same parent directory. Then if you put that directory on the classpath, you should be able to access all classes in all jar files

  • I shot video on a Panasonic P2 and I'm trying to import the MXF files to Final Cut Pro but when I try to import, the only thing that imports is a blurry image of each clip. There's no audio and no video...how can I import MXF files into Final Cut Pro?

    I shot video on a Panasonic P2 and I'm trying to import the MXF files to Final Cut Pro but when I try to import, the only thing that imports is a blurry image of each clip. There's no audio and no video...how can I import MXF files into Final Cut Pro?

    at the end, you say "import preferences", which program are you describing?
    So im safer using footage that is remotely being pulled from iphoto...
    vs
    using footage that is imported into FCP from imovie?
    Is there anything i can do in fcp to make this footage more reliable or safer or more stable as i pull remotely from iphoto?
    All the footage, and all the libraries to all programs, or on a new pegasus 12tb raid 5 setup fyi.

  • How can i put one scene into JPanel of the swing?

    how can i put one scene into JPanel of the swing?

    980571 wrote:
    ty for the information but i have a problen with JFXpanel when i try to into a panel it doesnt display insideSorry to hear that. If you want assistance with the code, feel free to post the relevant parts of it. Make sure to use \ tags when you do.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How can I sync text files into iPhone?

    How can I sync text files into iPhone? like doc. txt. for reading or editing

    The native iPhone OS doesn't allow that. I think there are several solutions to this, some of which may be against the AT&T or Apple rules. One legitimate solution is The Missing Sync for iPhone by mark/space (http://www.markspace.com).
    Before I had an iPhone, I owned a copy of The Missing Sync for Windows Mobile. It was a pretty decent app. In my opinion, though, their app for the iPhone is NOT worth the price ($40 new, $25 for a cross-grade).
    Also, check the App Store (if you have 2.0 software)--there may be an app that does this, probably for a lot less $.

  • How can I put my bookmarks into the sequence I want, alphabetical or otherwise?

    How can I put my bookmarks into the sequence I want, alphabetical or otherwise?

    http://kb.mozillazine.org/Sorting_bookmarks_alphabetically <br />
    http://kb.mozillazine.org/Sorting_and_rearranging_bookmarks_-_Firefox

  • How can i put below  table into internalt table

    how can i put below  table into internalt table and want to add both internal table into 3rd internal table.
    SELECT  * FROM J_1IEXCHDR  WHERE STATUS = 'P'.
    WRITE: / J_1IEXCHDR-LIFNR,
              J_1IEXCHDR-DOCNO,
              J_1IEXCHDR-EXYEAR,
              J_1IEXCHDR-BUDAT.
    SELECT * FROM J_1IEXCDTL  WHERE TRNTYP = J_1IEXCHDR-TRNTYP
                              AND DOCYR  = J_1IEXCHDR-DOCYR
                              AND DOCNO  = J_1IEXCHDR-DOCNO.
       WRITE: / J_1IEXCDTL-EXBAS,
                J_1IEXCDTL-EXBED,
                J_1IEXCDTL-RDOC1,
                J_1IEXCDTL-ECS.
    ENDSELECT.
    ENDSELECT.
    please help
    thanks in adavaced.

    hi laxman,
    use for all entries and get the required data.
    SELECT * FROM J_1IEXCHDR into table itab1 WHERE STATUS = 'P'.
    if not itab1[] is initial.
    SELECT * FROM J_1IEXCDTL into table itab2 for all entries in itab1 WHERE TRNTYP = itab1-TRNTYP
    AND DOCYR = itab1-DOCYR
    AND DOCNO = itab1-DOCNO.
    endif.
    so itab2 will have the common records...This will solve ur problem..
    also u can do other method declare an final internal table with the common fields of the two internal table.
    then after getting data in itab1 and itab2.
    loop at itab1.
    move-corresponding itab1 to itab3.
    read table itab2 with key <give the fields> = ......
    if sy-subrc eq 0.
    move-corresponding itab2 to itab3.
    endif.
    append itab3.
    endloop.
    Regards,
    nagaraj

  • How can I import vob files into imovie 09?

    how can I import vob files into imovie 09? i have some home movies on dvd that i want to edit.

    You might want to look at this one too.  Very easy to use and it doesn't require the Apple MPEG-2 playback component.
    http://www.dvdxdv.com/NewFolderLookSite/Products/DVDxDV.overview.htm

  • How can i import mpeg files into iMovie?

    how can i import mpeg files into iMovie?

    Where are your MPEG stored?
    I have hundreds of old MPEGs stored in my nexternal drive, but unfortunatly i was not able import them into iMovie. I did the following trick: I created a new set of a folder and subfolder and called it "Virtual_CAM/DCIM" and saved it on my desktop. Then went to Disk Utilities>File Menue>New>Disk Image from Folder. Then selected the folder on my desktop and clicked enter. I moved the .dmg file to my external (or just keep it on your desktop). I clicked on the .dmg file. It shoud be visible on the Finder. Open your Imovie and import as you do from your camera.

  • How can I put download file back on dock?

    How can I put download file back on dock?

    Welcome to Apple Support Communities
    If you want to put a folder in the Dock, open a Finder window and drag the folder to the right part of the Dock. In this case, you want to put the Downloads folder in the Dock again, so open a Finder window and drag Downloads from the Finder sidebar to the right part of the Dock

  • How can i put some file (xml) in root apk?

    how can i put some file (xml) in root apk?
    I put fileA in flash builder mobile project.
    build apk.
    fileA  →  "main.apk/assets/fileA" . 
    expect → "main.apk/fileA" .
    PS: view apk by Winrar.
    I have a Demo Android java project.
    It uses armeabi/libcasdkjni.so .
    build apk

    +assets
    +lib
    +META-INF
    +res
    -AndroidManifest.xml
    -classes.dex
    -CopyrightDeclaration.xml
    -mmiap.xml                                                       ←   fileA
    -resources.arsc
    -VERSION
    i build an ANE include armeabi/libcasdkjni.so.
    apk is missing mmiap.xml

    all files will be embed in "assests"(floder in apk ,which includes swf file) in that way.
    build apk

    +assets                                ←         "assets"
    +lib
    +META-INF
    +res
    -AndroidManifest.xml
    -classes.dex
    -CopyrightDeclaration.xml
    -mmiap.xml                                                       ←   fileA
    -resources.arsc
    -VERSION

  • How can i put my files that are in my ipad to my computer

    how can i put my files that are in my ipad to my computer, because i deled all them from my computer, but they are in my ipad.what am i supposed to do?

    What kind of files are they and what apps are you using on the iPad with these files?

  • How can i put txt files in my i phone 4

    how can i put txt files in my i phone 4

    There are many apps for this.
    I use idisk with mobileme.
    You can search the apps store or do a forum search and find several others.

Maybe you are looking for

  • Adobe Premiere SDK

    Desarrollo de plugins con Adobe Premiere Pro SDK

  • The call has not been answered

    I call, telephone numbers or skye directly, than the text "the call has not been answered" popped up, the person I call answer, we talk for 1 minute, 1 hour, 1 day... no limits... Why skype tells me that my call was not answered when it has had?

  • AppCrash Adobe Premiere Elements 10

    Hello guys, I need your help... Iam not longer able to use my Adobe Premiere Elements 10. Everytime I start the program, the following message and problem in detail occur: Problemsignatur:   Problemereignisname:    APPCRASH   Anwendungsname:    Adobe

  • Accidently deleted music wnat to know how to get it back

    while i was in london i added songs to my ipod nano from my cousins library. it worked fine and when i got home i wanted to add the songs to my library. but i accidently clicked "automatically update all songs and playlists" and lost the recently add

  • Used Dc dependency from one Track to another Track

    Hi All, Can you give me some solution for my scenario. 1) I have imported two tracks Track1 and Track2 from the server and created project locally from Inactive DCs. 2) I have already existing DC1 from SC1->Track1 and also i have another track Track2