Call muliple times wpg_docload.download_file is not working

Trying to loop thru blobs of data that I want to download, can download 1 file but trying to call this piece of code multiple times doesn't work on the second call
declare
Lob_loc BLOB;
Lob_loc1 BLOB
begin
select blob_data
into Lob_loc
from nextgen_ods.ods_data_files
where file_name = :P1_FILE_NAME;
owa_util.mime_header( nvl('BINARY','application/octet'), FALSE );
htp.p('Content-Disposition: attachment; filename="'||replace(replace(substr(:P1_FILE_NAME,instr(:P1_FILE_NAME,'/')+1),chr(10),null),chr(13),null)|| '"');
owa_util.http_header_close;
wpg_docload.download_file(Lob_loc);
select blob_data
into Lob_loc1
from nextgen_ods.ods_data_files
where file_name = :P1_FILE_NAME;
owa_util.mime_header( nvl('BINARY','application/octet'), FALSE );
htp.p('Content-Disposition: attachment; filename="'||replace(replace(substr('myFile',instr('myFile','/')+1),chr(10),null),chr(13),null)|| '"');
owa_util.http_header_close;
wpg_docload.download_file(Lob_loc1);
end;

Yes, this will not work.
Not fault of wpg_docload.download_file() though - you are not creating a valid Mime stream response with your code. You cannot pass 2 files back like that to the web browser as a single HTTP response. Not valid.
What is a valid response? It is one with a correct header and body.
What response does your code attempt to create? A <i>header + body + header + body</i>. This violates HTTP specs and will not work.

Similar Messages

  • I have a CC Photography License and tried loading the new Lightroom cc but it will not open (only flashes the welcome screen for a split second) then goes blank.  I tried uninstalling it, rebooting, etc. several times and it will not work on my Mac with Y

    I have a CC Photography License and tried loading the new Lightroom cc but it will not open (only flashes the welcome screen for a split second) then goes blank.  I tried uninstalling it, rebooting, etc. several times and it will not work on my Mac with Yosemite.  Please help!

    Check out this thread: Downloaded Lightroom CC but only get a quick flash of the startup screen then nothing, Lightroom 5 still working.

  • Dear all,  After Software Upgrade too iOS 6 , Face Time and iMessage is Not working anymore. E Mail is working. Any Ideal what to do. Kind Regatta from Hamburg Germany

    Dear all,  After Software Upgrade too iOS 6 , Face Time and iMessage is Not working anymore. E Mail is working. Any Ideal what to do. Kind Regards from Hamburg Germany

    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    iOS: About Messages
    http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
     Cheers, Tom

  • Time Machine options are not working. I am unable to schedule automatic backups.

    Time Machine options are not working. I am unable to schedule automatic backups.  The On-Off button is grayed out. I can perform a backup manually.

    Thanks for responding.  I have an external disk with plenty of room.  It is used only for backup of my computer.  I get a backup by clicking on the Time Machine icon at the top of the page and select "Back Up Now."  When I click on Time Machine Preferences, there is a box labeled "Options" which allows me to exclude items from backup and notify after old backups are deleted.  There is no option to schedule a backup.  The "OFF/ON" box is gray.  For "Next Backup:" it says "Automatic backups off."  I would like to turn it on.

  • I have a problem with Adobe Creative Cluod. Basically after installing the application when I open it I do not charge adobe products but remains all white screen. I tried to uninstall it and install it several times but it does not work.  What should I do

    I have a problem with Adobe Creative Cluod. Basically after installing the application when I open it I do not charge adobe products but remains all white screen. I tried to uninstall it and install it several times but it does not work.
    What should I do?

    Hi Anto2211,
    Please follow the thread: Black screen CC where this issue is already discussed and resolved.
    Let me know for any further query.
    Thanks,
    Ratandeep Arora

  • Hello, my itunes app is getting shut down every time I want to open it. Ever since I downloaded the last two updates. I tryed repearing the file and uninstalling and installing several times. Still, is not working. I work with music and need my itunes

    Hello, my itunes app is getting shut down every time I want to open it.
    I don't know if it's related but ever since I downloaded the last two updates. I tryed reparing the file and uninstalling and installing several times. Still, is not working. I work with music and need my itunes up and running. Does anybody know how to fix this?

    Hi Vero Torres,
    If you are having issues with iTunes unexpectedly quitting on launch after on your Windows machine, you may find the troubleshooting steps outlined in the following article helpful:
    iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues
    http://support.apple.com/kb/ts1717
    Regards,
    - Brenden

  • Time capsule now does not work with Lion just installed.

    Just downloaded Lion to Mac Air. Time capsule now does not work. Where is the problem?

    Restart the TC.. lion is stupid.. it forgets what it is connected to with alarming frequency ... like someone suffering dementia.
    If it continues to have issues, plug the TC directly to the lion computer by ethernet (if not already) and try again. Change the wireless to manual in airport utility and change the wireless name.. to force a new configuration. Once setup you can just use wireless.
    In the end you may need to reset the TC.. just hold in the reset button for about 10sec. It should then become available.. a reset does not do anything to data on the hard drive but you might need to restore any passwords.

  • My ipad will not let me slide to log in, or power off. i have tried to hold down the sleep and home button at the same time, but that did not work. Do you have any tips for me? Thanks

    my ipad will not let me slide to log in, or power off. I have tried to hold down the sleep and home button at the same time, but that did not work. D o you have any tips for me? Thanks.

    recovery mode
    open itunes on computer
    plug cable into computer not iOS device
    turn phone off
    hold home button and plug cable into phone.  do not release home button until an itunes graphic appears on device.
    look to computer should have message about recovery mode click ok and restore
    Peace, Clyde
    if u need an article see
    http://support.apple.com/kb/HT1808

  • Creative Cloud error message :could not implemented unzip a file on temporarily directory (EX11)I tried many times but it was not working.

    Creative Cloud error message :
    could not implemented unzip a file on temporarily directory (EX11)
    I tried many times but it was not working.

    Nobody can tell you anything without proper system information. Failing extractions can have all sorts of causes. Start with a little system maintenance:
    Installation Preparations | Mylenium's Error Code Database
    Mylenium

  • Cannot text out, only incoming texts but cannot call and Verizon's Chat is not working (I'm in Gabon Africa).  Why?

    Cannot text out, only incoming texts but cannot call and Verizon's Chat is not working (I'm in Gabon Africa).  Why?

    Using iPhone 5 and was able to send and receive texts and calls up top about ten days ago.  Nothing else has changed as far as I know.
    >> Personal information removed to comply with the Verizon Wireless Terms of Service <<
    Message was edited by: Verizon Moderator

  • Hello i was updating my ipod 5 to ios 8 and when it was in the middle of updating it came up that i had to connect to itunes and i have done so and its telling me to restore it and i have tried many time to and its not working. So what to i do??

    hello i was updating my ipod 5 to ios 8 and when it was in the middle of updating it came up that i had to connect to itunes and i have done so and its telling me to restore it and i have tried many time to and its not working. So what to i do??

    What exactly happens when you try to restore via iTunes?
    Error messages?

  • Call Of Duty LAN Servers does not work after installing Mavericks on my Mac Air, I need help!

    Hey everyone, I have some troubles making LAN servers on Call of Duty 4 and people can't join them after installing Mavericks on my Macbook Air. I need help!
    Thx!

    Hi,
    You don’t install VS2010 on the client PC, then where did the Form Invoice not work? When you run it from another version of VS? Or when you run the application with application.exe?
    Based on your description, one form works well, another form does not. I assume that two forms are in two different projects, then please check the .Net Framework used by the two projects. If they are different, you can use the
    one used by the Form contact for Form Invoice.
    Because this issue is a project issue, I recommend you to consult it on some application forum such as Windows Forms General forum for better support.
    VS General Question forum mainly discusses
    the usage of Visual Studio IDE such as
    WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help
    System and Visual Studio Editor.
    Thanks,
    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.
    Click
    HERE to participate the survey.

  • Time Machine Restore Interface not working (all else seems fine)

    I needed to get into Time Machine the other day to restore a file I acccidentally deleted.  I entered Time Machine to resore interface.  The timeline on the right shows all the past backups but the I was not able to call on any of the backup dates and times.  The two arrows to the bottom right of the screen did not allow me to sift through the windows either.  I know that the Time Machine is working and creating backups, and when I go through Finder to the disk, all the backups are there.  I was able to restoree the file I need using Finder and that was no big deal.  But that still leaves non-working restore interface which is something of a nuisance.  Does anyone have the same problem?
    I am using MacPro 4.1 running OS X 10.9.3.  My TM setup is to internal dedicated HD, RAID1 set up via disk utility.  The disk size is 2TB and currently has about 1.6TB of data (400GB free).
    Any help would be appreciated,
    Thanks in advance,
    Heidi

    I feel exceptionally stupid.
    The default window that appears on the restore interface was set to a particular folder from a drive that I do not backup on Time Machine.  I was trying to go to the date that I wanted to restore from first instead of navigating to the file I needed to restore.  Once I chose one of the drives/folders that I back up on Time Machine, all was fine.  I wish Time Machine would make the distinction obvious by graying out excluded items right away (when you go back in time, that does happen but not in the 'present' screen).
    Hope above helps in the future for those who may encounter the same problem before having had their first cup of morning coffee.
    It is good to know that Time Machine is working as it should, and I count myself one of those fortunate ones who do not have to use Time Machine to restore files that often (hence this elementary question: file under "my computer's not working because I didn't check to see if it's plugged in before calling customer service").

  • I created an Apple ID using my ISP Email when I registered at the Store/Apple Support Communities/iTunes/Face Time and it does not work in iChat. Why Not ?

    Question:-
    I created an Apple ID using my ISP Email when I registered at the Store/Apple Support Communities/iTunes/Face Time or other portal and it does not work in iChat. Why Not ?
    Answer:-
    For a Name to work in iChat it has to be an Valid AIM screen Name.
    Only Apple IDs from the @mac.com ending names registered here  and the Mobileme (@Me.com ending) names are Valid with the AIM service as well as being Apple IDs
    (I am still working on info about registering with iCloud at the moment but if this does give you an @Me.com email it may well be a valid AIM name as well)
    NOTES:-
    The @mac.com page works by linking an external (Non Apple) email with a @mac.com name.
    This External Email cannot be one linked to an Existing Apple ID (you have to use a second email or register at AIM )
    The options at AIM are to use your existing email or create new name and link the existing only for Password recovery
    MobileMe (@me.com ending names) were valid Emails addresses, Apple IDs AND a Valid AIM Screen Name
    @mac.com names look like emails but are only Apple IDs and iChat/AIM Valid Screen Names.
    The AIM registration page seems to be pushing you to register [email protected] This is relatively new and I have not followed through the pages to find out if it a valid AIM email (Previously you could register a name without an @whatever.com suffix)
    8:16 PM      Friday; June 10, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.7)
     Mac OS X (10.6.7),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

    Question:-
    So I have my current [email protected] email in iChat as I thought as I had linked that to an Apple ID it was a Valid iChat Name.  It keeps coming up with a UserName or Password Invalid message.  What do I do next ?
    Answer:-
    Open iChat
    Go to the Menu under the iChat name in the Menu Bar and then Preferences and then Accounts in the new window.
    Commonly written as iChat > Preferences > Accounts as directions/actions to take.
    If it displays with a Yellow running name in the list you have a choice.
    Either register it at AIM (I would use a different password to the ISP Login) and then change the password only in iChat  (It may take you to confirm any Confirmation email from AIM first) in iChat > Preferences > Accounts
    Or you register a new Name at AIM (Or at @mac.com) and enter that (details below)
    If you have a Blue Globe name  (@mac.com) that will not Login the chances are that it the password that is the issue.
    Apple lets you create longer passwords than can be used with the AIM Servers.
    Change the Password at iForgot to no more than 16 characters.
    Then change the password in iChat as details above.
    Adding a new Account/Screen Name in iChat (that is valid with the AIM servers)
    Open iChat if not launched.
    Go to iChat Menu > Preferences > Accounts
    Click the Add ( + )  Button at the bottom of the list.
    Choose in the top item drop down either @Mac.com or AIM depending on what you registered
    Add the name (with @mac.com the software will add the @mac.com bit)
    Add in the password.  (If you don't add it now iChat will ask you each time you open it)
    Click Done.
    The Buddy List should open (New Window)
    The Accounts part of the Preferences should now have the new name and you should be looking at the details.
    You can add something in the Description line which will then title the Buddy List (Useful when you have two or more names) and make it show up as that in the iChat Menu > Accounts and the Window Menu of iChat when logged in.
    You can then highlight any other Account/Screen Name you don't want to use and use the Minus ( - ) Button to delete it.
    8:39 PM      Friday; June 10, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.7)
     Mac OS X (10.6.7),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Deleting cookies, either one at a time or all, does not work; they reappear when I go back to view them. This is a critical privacy problem!

    Removing cookies does not work, either one at a time, or remove all. I tried from history and from the options screen. They appear to go away but when I go back in they are all back again. This is happening in the latest version that was automatically updated.'''bold text'''

    Do you have an extension like TACO (Abine) or TrackerBlock that maintains a set of OPT-OUT cookies?
    * Targeted Advertising Cookie Opt-Out (TACO): https://addons.mozilla.org/firefox/addon/targeted-advertising-cookie-op/
    * TrackerBlock: https://addons.mozilla.org/firefox/addon/trackerblock/
    * Beef Taco (Targeted Advertising Cookie Opt-Out): https://addons.mozilla.org/firefox/addon/beef-taco-targeted-advertising/
    In that case you need to remove such an extension to get rid of those cookies.

Maybe you are looking for

  • Changing Header in IDM

    Hi: Can anyone give pointers on how to change the IDM default header? Thanks,

  • Problem in creating csv file

    I have one problem in creating csv file. If one column has single line value, it is coming in single cell. But if the column has no.of lines using carriage return while entering into the table, I am not able to create csv file properly. That one colu

  • Alter types object in oracle 8.0.6

    Hi , I have one type object having name 'reftype' which is depend on preticular table Now I have to modify this type defination without deleting its depend object or table . I have tried to alter or add new attribute method but its giving below error

  • Lightroom 4/Lightroom 2 book

      I'm a hands on person who has learned some computer knowledge over time.  I have a digital camera and have had a beginning course in Photoshop.  I have about 9 thousand digital photos filed, backed up, keyworded, etc...  I've got a nice digital pho

  • WLC 7.0.98.0 CPU high utilization

    I could not find anything wrong with the show tech on WLC. Client complaints CPU high utilization. Please help!