Whose files do I see in wwv_flow_files.

Hi,
I wish to download and run a piece of vbscript in the users environment. The vbscript does a mail merge with word, dowloading the mail recipients through a URL that I provide.
Using the upload/download tutorial I have created my own procedure to download a file which I have uploaded.
The procedure goes like this:
create or replace procedure run_vbscript
as
v_length number;
v_file_content blob;
v_blob blob;
v_clob clob;
v_errmsg varchar2(100);
begin
begin
select blob_content
into v_file_content
from wwv_flow_files
where filename = 'labels.vbs';
exception
when others then
v_errmsg:= substr(sqlerrm(-sqlcode),1,100);
DBMS_LOB.CREATETEMPORARY(v_file_content, true, DBMS_LOB.SESSION);
dbms_lob.writeAppend(v_file_content, length(v_errmsg), utl_raw.cast_to_raw(v_errmsg));
end;
-- set up http header
-- use an nvl around the mime type and
-- if it is a null set it to application/octect
-- application/octect may launch a download window from windows
owa_util.mime_header('text/vbscript', false);
-- set the size so the browser knows how much to download
v_clob := to_clob('Dim sServer' || chr(10) || ' sServer = "http://<link to xml generating page>"');
v_blob := wwv_flow_utilities.clob_to_blob(v_clob);
dbms_lob.append(v_blob, v_file_content);
v_length := dbms_lob.getlength(v_blob);
htp.p('content-length: ' || v_length);
-- the filename will be used by the browser if the users does a save as
htp.p('content-disposition: attachment; filename="labels.vbs"');
-- close the headers
owa_util.http_header_close;
-- download the blob
wpg_docload.download_file(v_blob);
end run_vbscript;
grant execute on run_vbscript to public
The tricky thing is that when I run this procedure in the SQL Workshop, I get the contents of my uploaded file. When I invoke it from a URL where the URL is #OWNER#.run_vbscript, the procedure executes but the file contents is replaced by the error message "No data found".
Replacing "where filename = 'labels.vbs'" with "where rownum < 2" will provide me with a file from a completely different user.
What is the reason, and what is the best solution?
Thanks in advance,
Torben

Torben - The wwv_flow_files view shows you documents in the documents table (defined in the DAD) that are associated with the workspace to which you a currently authenticated. This is the workspace you logged into for SQL Workshop, or the workspace associated with the APEX application that is running your query against the view. If you run the procedure through the URL directly, you are not authenticated so you don't see any rows (except a few orphaned documents).
If you upload files and transfer them to your own table, then you could download from your table, implementing whatever security measures you deem appropriate.
Scott

Similar Messages

  • TMS error: "Offline Call          could not access file as supposed (see.."

    i am running an NSP Netweaver on top of Windows 7. when performing RSTPTEST, I get the following error, right at the end. All the other tests are fine.
    It looks like an permissions problem with possibly the file system, but i have tried giving all to all.
    I have been trying for days to fix this.
    if anyone can help, please do.
    i have checked log files, and about the only useful one is the SLOG1019 which gives me one line
                     FATAL No stdout redirectio NSP   0000 20100510080609              BCUSER       pc    
    when i try to distribute the TMS i also get "Transport control program tp ended with error code 0212" again, looks like an authorization error.
    i am not a basis person, more developer.
    any pointers and help, cheers
    Edited by: gingle on May 10, 2010 8:13 AM

    Hi gingle,
    Meaning of returncode 212 is:
      could not access file as supposed (see SLOG for more details)
    Is there any error in the corresponding SLOG?
    You can find the SLOGxxxx.<SID> under usr/sap/trans/log.
    Best Regards
    Julia

  • Does iTunes match need to locate the actual files or just see its record in your library database? I am currently traveling in US and I have US and Australian iTunes accounts. But all my music files are on a hard drive in Australia.

    Does iTunes match need to locate the actual files or just see its record in your library database? I am currently traveling in US and I have US and Australian iTunes accounts. But all my music files are on a hard drive in Australia. Can I start using itunes music match while I am travelling without the actual music files attached to my itunes?

    In your situation I strongly recommend you read over that KB article. The international iTunes Stores are not cross-compatible.
    My understanding of how it would work is that when activating iTunes Match on your US Store account, any songs you have in your iTunes Library that were purchased from the AUS Store account will NOT be matched. As I understand it, those files will be uploaded (which means you need the files on a local HDD). I also do not think it is possible to have iTunes Match active on more than one store ID on the same computer. But since iTunes Match is not available internationally yet, that point is moot for the moment.
    To be honest you might want to wait until the service is available internationally so you can guage how will it will serve you.

  • In Keynote09, if i set custom presenter display settings (large presenter notes), and i save the file, will i see my notes in the same way on another computer? Are the presenter display setting saved in the file?

    In Keynote09, if i set custom presenter display settings (large presenter notes), and i save the file, will i see my notes in the same way on another computer?
    Are the presenter display setting saved in the file?
    Thanks for your help!

    it wont.
    Presenter note display is set per machine.
    Surprising nobody in this community knew this.

  • Two weeks into owning my iMac and I trashed a bunch of files. I see "recovery" software advertised. Anyone know anything that would be helpful?

    I'm embarrassed to admit somehow emptied my trash with hundreds of files. I   see on the web "recovery" software advertised. I don't dare pursue until I'm sure it's safe. In all the years using a PC I never did such a stupid thing. All the data lost are documents I transferred ffrom the PC -- Word docs, Excel docs, photos,  personal stuff. The good news is these are all on my PC in the cellar. Any words of wisdom out there?

    If you still have them on the PC, that's by far the best way to recover them.
    There are several recovery software options, but mostly quite expensive and none of them can guarantee that files can be recovered in a usable form.
    Even when they are recovered, they won't be organised - it'll just be a collection of files which you'll need to check for integrity and then re-organise.
    They also require an external HD to recover to - preferably a bootable one.
    Having used a couple of them in anger myself, I'd consider them a last resort if the alternative is merely inconvenient.
    And of course, it is wise to always have a backup; preferably a bootable clone kept up to date, but TM is a minimum reccomendation.
    Please don't use the trash as a storage area - you can't delete selectively from there; it's all or nothing.

  • Used tip in fonts wiki; wrote to wrong file, need to see the original

    one night while bored i decided to use the lcd packages mentioned in our fonts wiki.
    wiki wrote:The "fontconfig-lcd" package enables by default the "lcddefault" filter. You can edit the /etc/fonts/conf.avail/10-lcd-filter.conf file and replace it with another filter.
    i accidently misread this as /etc/fonts/conf.d/10-lcd-filter.conf.  everything went smoothly (no loss in functionality or anything) but i randomly starting seeing an error while doing some tasks (like for instance, installing the cmatrix package)
    paraphrased error (can't remember exactly):
    error wrote:Error in /etc/fonts/conf.d/10-lcd-filter.conf.  Invalid constant "lcddefault".
    this was when i realized i edited the wrong file.  but i don't know what to put it back to.  i've tried "none", "default", and "lcdlegacy".  "lcdlegacy" silenced the error while installing cmatrix (found that out while trying to get the error syntax for this post).  but i _did_ pop up during some other task i can't remember now... i swear.  all choices will randomly pop up that same error during some random task.
    if someone's got the lcd-filters installed as per our wiki, can i see your conf.d/10-lcd-fonts.conf so i can put mine back?
    many thanks
    also, interstingly:
    > pacman -Qo /etc/fonts/conf.d/10-lcd-filter.conf
    error: No package owns /etc/fonts/conf.d/10-lcd-filter.conf
    > pacman -Qo /etc/fonts/conf.avail/10-lcd-filter.conf
    /etc/fonts/conf.avail/10-lcd-filter.conf is owned by fontconfig-lcd 2.6.0-1
    should i just remove it?  i feel like the error message would read differently if the file shouldn't be there all together... but i'll be happily corrected on that.
    edit: typos... as usual
    Last edited by brisbin33 (2009-02-20 01:23:21)

    no, i want the fontconfig-lcd package... plus it doesn't own the conf.d file anyway, as per the pacman output.  i just edited the wrong file and wanted to know what it looked like before i did that (i.e. on a default system).  my post may be a bit confusing, i apologize. 
    i've removed (and saved) the file, we'll see how that goes...

  • I have just purchased the new Canon 7D II.  I am using CS6 and Lightroom 5.0, neither of which can open the RAW files although I see from the list of supported cameras that the 7D II is covered.  I have updated both CS6 and LR so that is not the problem.

    I have just purchased the new Canon 7D II.  I am using CS6 and Lightroom 5.0, neither of which can open the RAW files although I see from the list of supported cameras that the 7D II is covered.  I have updated both CS6 and LR so that is not the problem.  Not sure what to do next.

    It has been indicated that both of those cameras will be supported in the final release of Camera Raw 8.7. But there is no announced release date. There never is. I assume it will be before December 31. But that is only my guess based on the fact that the release candidate expires then.

  • Eventhough data present in the D Drive (Database files), E Drive (.Pag) files, we can see data is coming as zero in Excel retrival.

    Eventhough data present in the D Drive (Database files), E Drive (.Pag) files, we can see data is coming as zero in Excel retrival. Can anyone help me to figureout this issue.
    Thanks,
    SRI

    Hi
    Verify the below details:
    1. Whether your app/db started successfully.
    2. Check the database properties :
    Storage tab - .ind and .pag  exits.
    Statistics tab -  whether any number exists in "number of existing blocks" and "existing level 0 blocks"
    3. If all the above properties in esbase are fine then check your excel add-ins options settings while retrieval.
    Thanks

  • How to get all image files from a folder to wwv_flow_files?

    Hi there!
    Is it possible in apex to show, in a report look-a-like, all image filenames from a folder in another machine (i enter in that machine by ip) and insert all files into wwv_flow_files?
    I want to see all files, then pick one and open a image...
    But it can't be by browse item... it has to show all filenames as a list...
    If it is possible, how can i do it?
    Thanks!
    Best regards,
    Luis Pires

    Hi,
    you can connect to the server using UTL_HTTP.
    Then for each files you copy the response into a BLOB to be able to show it or to store it in a table.
    A piece of code :
    begin
       -- initialize the BLOB.
       dbms_lob.createtemporary(l_blob, false);
       -- path to the file
       l_url := 'http://your_server/your_file.jpg';
       -- begin retrieving the target.
       l_req := utl_http.begin_request(l_url);
       -- identify ourselves (some sites serve special pages for particular browsers)
       utl_http.set_header(l_req, 'User-Agent', 'Mozilla/4.0');
       -- start receiving the response.
       l_resp := utl_http.get_response(l_req);
       -- copy the response into the BLOB.
       begin
          loop
             utl_http.read_raw(l_resp, l_raw, 32767);
             dbms_lob.writeappend (l_blob, utl_raw.length(l_raw), l_raw);
          end loop;
          -- stop when exception end_of_body is raised
       exception
          when utl_http.end_of_body then
             utl_http.end_response(l_resp);
       end;
    end;It's a minimal example, you may need authentication, check l_resp.status_code, etc...

  • Can some help with CR2 files ,Ican`t see CR2 files in adobe bridge

    can some help with CR2 files ,I can`t see CR2 files in adobe bridge when I open Adobe Photoshop cs5- help- about plugins- no camera raw plugins. When i go Edit- preference and click on camera raw  shows message that Adobe camera raw plugin cannot be found

    That's strage. Seems that the Camera Raw.8bi file has been moved to different location or has gone corrupt. By any chance did you try to move the camera raw plugin to a custom location?
    Go To "C:\Program Files (x86)\Common Files\Adobe\Plug-Ins\CS5\File Formats" and look for Camera Raw.8bi file.
    If you have that file there, try to download the updated camera raw plugin from the below location.
    http://www.adobe.com/support/downloads/thankyou.jsp?ftpID=5371&fileID=5001
    In case  you ae not able to locate the Camera Raw.8bi file on the above location, then i think you need to re-install PS CS5.
    [Moving the discussion to Photoshop General Discussions Forum]

  • HT201250 Can I restore photo files from Time Machine without the use of an external drive?  I'm trying to restore lost photo files and I see them listed in Time Machine (without use of an external drive), but when I try to restore I get a error code 36.

    Can I restore photo files from Time Machine without the use of an external drive?  While I was transferring photos back and forth from a thumb drive something went haywire and my IPhoto was wiped clean!  When I click on Time Machine I see all the dated pages (without an external storage drive connected), go back to a date where all my photo files are there, click "restore", and I get the message:  "The Finder can't complete the operation because some data in file cant be read or written (error code - 36)"

    Thanks so much Terence.  I tried some of the fixes from that page, but then discovered the suggestion to compress the Time Machine Back up of the original library and transfer it as a zip back to my computer as detailed here:
    http://pondini.org/TM/E9.html
    That worked like a charm.  I really appreciate it. 

  • Numbers tell me I need an uptodate version to open a file created but I have the latest version so I am unable to open the files. I see others are having the same problem. Is there a solution?

    Numbers tell me I need an upto date version to open files though I have the latest version installed and used to create the files in the first place is there a solution.

    Please see this user tip:
    Need newer version of Numbers to open file

  • Just paid $6.99 for iPad highlighter at App Store.  It's supposed to let me highlight things in a PDF file.  I see no way to make it work in a PDF file.  Thanx ahead of time for any help.

    Just paid $6.99 for iPad highlighter at App Store.  I can find no way to make it work in the iPad file when I call it up.  It just sits there like any other app.  Thanx in advance for the help. [email protected]

    See if the developer has a website with intstructions. Check around in the app for instructions. They're often under settings. Contact the developer.

  • Using file manager to see files stored on the camera

    I use an EOS 350D. With Windows XP, uisn File Manager (Windows Explorer) I could see the camera as a drive, and could see the list of image files on the camera, select and download them etc. However, using windows 7 I do not see the camera as a drive. Why is that? Is it because I have all the Canon software loaded? What can I do to have direct access to the files on the camera via File Manager. I don't use the Canon software for anything.

    From Canon ...
    "There is no driver for the OS Version you selected. The driver may be included in your OS or you may not need a driver."
    This is true for Win 7 or XP.
    "Change the camera’s USB connection mode from “PC” to “Print/PTP”.
    This is required for all older cameras. But it does not require any Canon software since it is an in-camera setting,
    EOS 1Ds Mk III, EOS 1D Mk IV EF 50mm f1.2 L, EF 24-70mm f2.8 L,
    EF 70-200mm f2.8 L IS II, Sigma 120-300mm f2.8 EX APO
    Photoshop CS6, ACR 9, Lightroom 6

  • Ipod touch full with 'other files' - can't see how to get rid!

    My ipod touch has 17.5GB of 'other' files but I can't see how and it won't let me sync all of my songs I've clicked through all the summary bits. I've unticked all videos, TV programmes etc so they shouldn't sync onto the device but nowhere can I see anything about other files! VERY VERY VERY FRUSTRATING! Please help!
    Thanks in advance.

    An "other" larger than about 1 1/2 GB indicates corrupted files.
    What is the Other on my iPhone and How to Remove It
    What is "Other" and What Can I Do About It?
    Next, usually restoring from backup eliminated the corrupted files. However, sometimes restoring to factory settings/new iPod is required.
    To restore from backup see:
    iOS: How to back up
    To restore to factory settings/new iPod see:
    iTunes: Restoring iOS software

Maybe you are looking for

  • Field Length of the text field on the screen

    Hello Experts,, I have field with its label on the screen. Now the label text is picked up from data dictionary as defined. Data element       J_3ARQDA                       Active Short Description:  Requested delivery date Length           Field  

  • ORA-28367: wallet does not exist  Re-Post From SQL PL/SQL

    Hi all Please Help about this The Detail of Sqlnet.ora file and Wallet is under wallet Directory ENCRYPTION_WALLET_LOCATION = (SOURCE = (METHOD=FILE) (METHOD_DATA = (DIRECTORY = d:\oracle\product\10.2.0\admin\ORA10DB\wallet))) But i want to Alter Thr

  • Controlling external keyboard using MainStage

    Hi guys, i need help... I'm start in the mainstage word. i used cubase for control my vst's and my pc3x kurzweil. a friend show me the mainstage and i loved. It's perfect for vst's control and the interface is very dynamic. but i have a big problem..

  • Detailed list per profit center in FAGL_FC_VAL

    Hi, we are on ECC6 and have a question relating to foreign currency revaluation. If we run transaction FAGL_FC_VAL the list that is returned shows the document lines, their historic rate, revaluation rate and the amount to be posted. However, this li

  • Function module based generic extractor - Problem with the selection

    Hi all The following is my code in the function module. I am able to get the entire data if i dont give any selections and the number of records is also correct. But when i select a MATNR value, it returns 0 records where as it needs to return 3 reco