Upload a file to the application top using File Upload feature of OAF

Hi,
I am facing some problem when trying to upload a file from my desktop to the application directory (e.g. AR TOP).
I do not want to use the fnd_lob table,want to load the file to that directory directory, is it possible using OAF file upload?

Refer the following code
* Method used to write the contents (data) from an Oracle BLOB column to
* an O/S file. This method uses one of two ways to get data from the BLOB
* column - namely using Streams. The other way to read data from an
* Oracle BLOB column is to use getBytes() method.
* @throws java.io.IOException
* @throws java.sql.SQLException
public void readBLOBToFileStream()
throws IOException, SQLException {
FileOutputStream outputFileOutputStream = null;
InputStream blobInputStream = null;
String sqlText = null;
Statement stmt = null;
ResultSet rset = null;
BLOB image = null;
int chunkSize;
byte[] binaryBuffer;
int bytesRead = 0;
int bytesWritten = 0;
int totBytesRead = 0;
int totBytesWritten = 0;
try {
stmt = conn.createStatement();
outputBinaryFile2 = new File(outputBinaryFileName2);
outputFileOutputStream = new FileOutputStream(outputBinaryFile2);
sqlText =
"SELECT image " +
"FROM test_blob " +
"WHERE id = 2 " ;
rset = stmt.executeQuery(sqlText);
rset.next();
image = ((OracleResultSet) rset).getBLOB("image");
// Will use a Java InputStream object to read data from a BLOB (can
// also be used for a CLOB) object. In this example, we will use an
// InputStream to read data from a BLOB.
blobInputStream = image.getBinaryStream();
chunkSize = image.getChunkSize();
binaryBuffer = new bytechunkSize;
while ((bytesRead = blobInputStream.read(binaryBuffer)) != -1) {
// Loop through while reading a chunk of data from the BLOB
// column using an InputStream. This data will be stored
// in a temporary buffer that will be written to disk.
outputFileOutputStream.write(binaryBuffer, 0, bytesRead);
totBytesRead += bytesRead;
totBytesWritten += bytesRead;
outputFileOutputStream.close();
blobInputStream.close();
conn.commit();
rset.close();
stmt.close();
System.out.println(
"==========================================================\n" +
" INPUT STREAMS METHOD\n" +
"==========================================================\n" +
"Wrote BLOB column data to file " + outputBinaryFile2.getName() + ".\n" +
totBytesRead + " bytes read.\n" +
totBytesWritten + " bytes written.\n"
} catch (IOException e) {
System.out.println("Caught I/O Exception: (Write BLOB value to file - Streams Method).");
e.printStackTrace();
throw e;
} catch (SQLException e) {
System.out.println("Caught SQL Exception: (Write BLOB value to file - Streams Method).");
System.out.println("SQL:\n" + sqlText);
e.printStackTrace();
throw e;
--Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • The report I published on the SQL server report server is not showing in the application we use to retrieve reports.

    The report I published on the SQL server report server is not showing in the application we use to retrieve reports. My cell phone number is {removed}
    Thanks.

    Hello Roger Tenn,
    Thank you for posting in the TechNet Forum.
    As this issue is related to SQL server report server, to receive better report, it is recommended to ask in the SQL server forum.
    https://social.technet.microsoft.com/Forums/en-US/home?category=sqlserver
    The professionals here will be glad to help you.
    Best regards,
    Fangzhou CHEN
    Fangzhou CHEN
    TechNet Community Support

  • I have OS 10.9.4, and I can't change the basso alert sound for Reminders.  Works ok for the rest of the applications that use an alert sound.  Help?

    I have OS 10.9.4, and I can't change the basso alert sound for Reminders.  Works ok for the rest of the applications that use an alert sound.  Help?

    http://www.microsoft.com/mac/support
    http://answers.microsoft.com/en-us/mac/forum/macword?auth=1
    http://answers.microsoft.com/en-us/mac/forum/macoffice2011-macword/microsoft-wor d-for-mac-2011-will-not-open-error/ecc42616-6f49-40bb-b8f5-e21c711ea359

  • Every time when i turn my mac on all of the applications i used frequently open up..that is so annoying how do i stop that

    every time when i turn my mac on all of the applications i used frequently open up..that is so annoying how do i stop that.

    Lion?
    Disable Mac OS X Lion Resume & App Window Restore Completely
    Disable “Reopen Windows When Logging Back In” in Mac OS X Lion Completely

  • To upload excel file directly to the application server using OLE concept

    hi experts
    i have done a coding in OLE to download excel with graph to presentation server, is it possible to upload excel with graph directly to the application server  , the excel should have graph while downloading to presentation server fom app server.
    Moderator message - duplicate post locked
    Edited by: Rob Burbank on Jun 25, 2009 9:49 AM

    HI,
    have a look at tcode cg3z and then FM 'C13Z_FILE_UPLOAD_ASCII'.
    What you can do is, first create the file on presentation server using OLE automation, and then using this FM, write the file to Application server

  • How to define the application to use for opening each file type (pdf, jpg,...)

    I installed an external application, and this new application has been configured by defect that it will be used to open all files with extensions like jpg, pdf, etc...
    I want to revert this situation and define again the proper application I want to use for opening each file type. How can I do this in Lion?
    Thanks,
    Azaldier

    Pick a representative file.
    Get info. (Command-i)
    There you will see a place "Open with" where you can select the application for that file.
    Hit the "Change all..." button to do this for all files of this type.
    charlie

  • When trying to open Pages 4.0.1 I get a message stating "Pages cannot be opened because of a problem, check with the developer to make sure Pages works with this version of Mac OS X. You may need to reinstall the application." Using OS X 10.6.8

    When trying to open Pages 4.0.1 I get a message stating "Pages cannot be opened because of a problem, check with the developer to make sure Pages works with this version of Mac OS X. You may need to reinstall the application. Be sure to install any available updates for the application and Mac OS X."
    I've run the software update several times. Pages is located in my iWork '09 folder in Applications. Using OS X 10.6.8

    Delete and reinstall it.
    (104030)

  • How can we Authenticate the Application by Using OAuth Protocol in IPhone App

    I want to create an application where i want to use OAuth protocol,like i want to communicated with the application like facebook from my application..
    How can i do it?

    You have a better chance of getting your question answered in the Developers Forum.
    Suggest you repost there:
    Developer Forums

  • I get "ordinal 5 (and at times 18) is not found when trying to start the application? Using windows Vista Business.

    when starting the application I get the following message "ordinal 5 ( and at times 18) can not be found in the dynamic link libray" I'm using a Lenovo x300 with "Vista Business"

    Have you tried to put the Main-Class under a package (e.g. move LaunchSimulator to org.jyothi.sunke.LaunchSimulator or something)? I'm not sure but it's possible that Main-Class can't be located in the "root package", because the JAR launcher can't address it.
    Always put your stuff in a package, otherwise it can't be addressed by other packaged classes.
    - Erik

  • Performance Impact for the Application when using ADFLogger

    Hi All,
    I am very new to ADFLogger and I am going to implement this in my Application. I go through Duncan Mill's acticles and got the basic understanding.
    I have some questions to be clear.
    Is there any Performance Impact when using ADFLogger to slower the Appllication.
    Is there any Best Practices to follow with ADFLogger to minimize the negative impact(if exists).
    Thanks
    Dk

    Well, add a call to a logger is a method call. So if you add a log message for every line of code, you'll see an impact.
    You can implement it in a way that you only write the log messages if the log level if set to a level which your logger writes (or lower). In this case the impact is like having an if statement, and a method call if the if statement returns true.
    After this theory here is my personal finding, as I use ADFLogger quite a lot. In production systems you turn the log lever to WARNING or higher so you will not see many log messages in the log. Only when a problem is reported you set the log level to a lower value to get more output.
    I normally use the 'check log level before logging a message' and the 'just print the message' combined. When I know that a message is printed very often, I first check the level. If I assume or know that a message is only logged seldom, I just log it.
    I personally have not seen a negative impact this way.
    Timo

  • How to configure Outlook 2013 to call direct from within the application without using Lync 2013?

    I have Outlook 2013 running on Windows 7 Pro 64-Bit with Lync 2013 (Office 365 Pro). We are using a 3rd party TAPI app from FortiVoice. WE would like to be able to place calls directly from
    within Outlook either by selecting a telephone number within an email and/or via the PEOPLE (Contacts) area.
    What guidelines should we use to enable this feature and not have Lync 2013 intercepting the process i.e. let OUTLOOK handle placing calls?
    Thanks in advance for any feedback provided.

    Hi,
    There seems no solution for this issue so far.
    Here is a fix for older versions of Outlook, maybe worth a try.
    http://support.microsoft.com/kb/959625/en-us
    However, if it doesn’t work, please try Malte’s reply as the workaround in the following thread. See:
    http://social.technet.microsoft.com/Forums/office/en-US/3946f1bb-cc3d-41b6-ab9c-092d62d024d1/outlook-2013-tapi-calling-with-lync-installed?forum=officesetupdeploy
    Thanks.
    Steve Fan
    TechNet Community Support
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Game center makes a lot of hassle when using the application CHESS using  Mountain Lion / Mac Air.

    Problem statement:
    You launch  chess through launch pad.  It starts.   You  move a pawn in the chess board.
    Inmediately after,  Game Center appears (I do not have launched it).
    You order to quit it.  It quits.  After few sec, game center appears again.
    You try now  to  cancel the game of game center  that you find in the screen.  You fill the invitation to login to game center with your Apple ID  account which has the E-mail address identification.
    The situation remains the same. 
    Game center gets perturbating  once and again.
    No way to  proceed with a chess game.  So annoying!
    You try 3  times.  Shut down and restart, just in case there were something wrong in the sesssion.
    What diagnosis can be done to  identify the root cause?
    Who to report?
    Thank you.

    Yeah, I'm having the identical problem; don't want to buy another chess game when we're supposed to have this one on ML.

  • My ipad 1 close the application on use itself, My ipad 1 close the application on use itself

    On my ipad 1 The app unexpectedly quits

    This usually resolves app instability issues:
    Quit all apps: Double tap the Home button, hold an app icon until they wiggle, tap for each open app, double tap Home button
    then
    Reset: Hold the Sleep/Wake and Home buttons and don’t let go until the screen goes dark and the Apple logo appears (no data will be lost)

  • Opening SWF Files in the Application window

    Hello Everyone,
    We have a problem in opening .swf files in our application.
    We had quick time movies(.mov) which we used to open and
    play inside the application window, using QuickTime Framework APIs
    in the code.
    Presently we had converted these quicktime movies(.mov) into
    .swf files and we are unable to open the same using Quick Time
    Framework in MacOSX.
    Can you please suggest me as how should I proceed, i.e which
    framework should I use in the code to open and play .swf files in
    the application window?
    It will be better, if you can send me a small sample code to
    use in my application for MacOSX.
    Awaiting for your kind reply,
    Thanking you,
    With Best regards,
    Anil.

    Hi Vaibhav,
    I need to display the serarch results in the same window.
    I have followed the steps mentioned by you in the thread
    <i> Search Results in the Same Window..as we have in SDN</i>
    Even after making changes to 2 PAR files mentioned in the above thread, on click
    of Search button nothing happens.
    It will be great if you can send me your modified PAR files, to identify where i am
    going wrong. My mail id is [email protected]
    Thanking you,
    Vikas

  • Is there a way I can force an application to use the GPU?

    I own a MacBook Pro 15in with retina display with integrated graphics from NVIDIA GeForce GT 750M. Currently I have my settings in the "Energy Saver" section of the System Preferences set for automatic graphics switching. I use an interior design application called Live Interior 3D Pro. This application uses a lot of 3D rendering that lags for a 2-3 seconds. I checked my activity monitor to see if the application was using the GPU, and it indicated it was not. I understand that I can uncheck the automatic graphics switching to fix the problem, but the problem is I hear it screws with the battery life. I do not want to switch off the automatic switching setting but do want this specific application to use the GPU instead of the built in Intel Iris Pro graphics thing. Is there a setting I can use to make just this application fire up the GPU when I open it? If not, do you know if switching off the automatic graphics switching setting messes with the battery at all? Also, does this mess with the performance of the machine overall since I have 16GB of RAM and only 2GB of GPU power or are those totally different and irrelevant? Thank you for your time and thank you in advanced for your help!!!!!!!!

    jspatel1011,
    your MacBook Pro’s discrete NVIDIA GPU is more powerful than its integrated Intel graphics; that power comes at the cost of increased energy consumption. There’s no setting to allow exceptions to the automatic graphics switching; you’ll have to determine whether that power vs. energy tradeoff is worth it when running Live Interior 3D Pro or not. If it is worth it, then disable the automatic graphics switching before you run Live Interior 3D Pro, and reënable it after you quit that app. (You might look into AppleScript to see if that disabling and reënabling can be automated.) If it’s not worth it, then you’ll have to live with the lagging while it does the 3D rendering.

Maybe you are looking for

  • Dispairing. Windows install of DS 6.0 endless problems.

    Hellos.. Is it possible to get the Sun Java Enterprise 5 Directory Server installed on Windows from the JES5 suite? The latest problem I face is that the cacao is not running. I discover this when trying to create a new DS instance from the DSCC I ge

  • Adding desktop PCs to home wireless

    I've got the FIOS router in my basement.  Part of my home network is wired with 1000 base-T nics, IPs assigned through DHCP.  I would like to add two computers two floors upstairs to the network wirelessly.   The computers are probably about 100ft aw

  • SL510 0210 Stuck Key 02 with no keyboard attached

    Some liquid got spilled on the keyboard. Now it gets the subject message when turning on. I have taken the keyboard out and dried it with compressed air. No success. Same error. I also attempted to start the thinkpad without the keyboard attached and

  • Can one ipod "infect" the PC and the other ipod?

    Hi - I'm having a terrible time fixing this error. We use two ipod minis on the same Windows 2000 PC, on the same user account, connecting with firewire (don't have USB2, so USB isn't an option). For about a month everything was hunky dory, and then

  • Printing incorrect characters

    I have a HP 4500 wireless printer-and downloaded the driver from the web site( I had originally installed this via the disk) Still have a problem, which is now worse than before when it printing a PDF-top half prints correctly-bottom half-characters,