How do I make the webutil file transfer works correctly?

Hello,
I'm using Oracle 10g Database and form builder in developer suite 10g release 2. Running on Windows XP SP2.
I've created a database user, executed the create_webutil_db.sql , and created a table as below:
CREATE TABLE DOCS
(DOC_ID VARCHAR2(15) NOT NULL,
DOC_IMAGE BLOB,
TEXT_DESCRIPTION CLOB,
FILENAME VARCHAR2(80),
FILE_SIZE NUMBER NOT NULL,
CONSTRAINT PK_DOCS PRIMARY KEY (DOC_ID)
I've created two buttons in the from, one for upload and one for download
the upload code:
DECLARE
     fname VARCHAR2(1000);
     fext VARCHAR2(1000);
     result BOOLEAN;
BEGIN
     fname := Client_Get_File_Name(null,null,null,null,OPEN_FILE,TRUE);
     fext := fname;
     WHILE instr(fext,'.') <> 0 LOOP
          fext := substr(fext,instr(fext,'.')+1);
     END LOOP;
     IF LOWER(fext) <> 'doc' THEN
          message('Only Microsoft Word Document (*.doc) can be uploaded');
     ELSE
          result := Webutil_File_Transfer.Client_To_DB
          (trim(fname),'DOCS','DOC_IMAGE','DOC_ID = ' || '''' || :DOC_ID || '''');
          IF result THEN
               message ('Upload success');
               :FILENAME := fname;
               :FILE_SIZE := WebUtil_file.file_size(:FILENAME);
               WHILE instr(:FILENAME,'\') <> 0 LOOP
                    :FILENAME := substr(:FILENAME,instr(:FILENAME,'\')+1);
               END LOOP;
          ELSE
               message ('Upload failed');
          END IF;
     END IF;
END;
and the download code:
DECLARE
     result BOOLEAN ;
BEGIN
     IF :FILE_SIZE > 0 THEN
          result := Webutil_File_Transfer.DB_To_Client
     (trim(Client_Get_File_Name(null,:FILENAME,null,null,SAVE_FILE,TRUE)),'DOCS','DOC_IMAGE','DOC_ID = ' || '''' || :DOC_ID || '''');
          IF result THEN
               message ('Download success');
          ELSE
               message ('Download failed');
          END IF;
     ELSE
          message('No file to download');
     END IF;     
END;
I can upload the file to the database, and download the file.
However, the file being downloaded is corrupted. I don't know why this will happen. I've tried to rebuild the form, re-attach the webutil library, rebuild the database users and tables, but all these doesn't work.
Please help, thank you.
Message was edited by:
se072c23

1 Can u try running the sample form available from OTN (WU_TEST) and check whether it works
2 If it doesnt then enable the java console and check the error message
Rajesh ALex

Similar Messages

  • How can I make the pdf file size smaller?

    How can I make the pdf file size smaller?

    Hi vickyb,
    Reducing the file size of PDF requires Acrobat (one way is by choosing File > Save As > Reduced Size PDF). If you don't have Acrobat, you can try it free for 30 days. See www.adobe.com/products/acrobat.html for more information.
    Best,
    Sara

  • Saved download for Camera Raw update. still can't open Raw pic in CS5. How do I get the downloaded files to work so I can open Raw images? thanks, Artist Ray

    Bought new camera to work with Raw images in CS5 but file would not open so I downloaded latest update. It only allowed me to save in a file ( could have OPENED instead of saving so I don't know those results). How do I get the new download to work in CS5?
    Thanks for your help, Artist Ray

    Bought new camera
    Which camera make and model?
    Supported cameras
    Camera Raw plug-in | Supported cameras
    Compatible Adobe applications
    Camera Raw-compatible Adobe applications
    Why doesn’t my version of Photoshop or Lightroom support my camera?

  • How do i make the pdf file so that people can fill in the blanks

    i converted a file i had into adobe but i need to know how to make it so that people can fill in the blanks only on the form without being able to change it

    If you have Acrobat, you add form fields. In Acrobat 11, you'd select: Tools > Forms > Edit
    When you do this it will ask if you want Acrobat to detect form fields for you. This is known as the Form Wizard and it will attempt to divine where it thinks form fields should go based on the content. It work fairly well sometimes, but you will often want to make refinements such as changing the types of fields, the field names, certain field properties, etc.
    You decline this automatic field generation and create them all yourself using the various tools available in form editing mode.
    More information is available in Acrobat's help and numerous tutorials at http://www.AcrobatUsers.com

  • How do I make the audio files on my site download?

    Hi
    In my site there are links to some audio files. When click the links in chrome or firefox, the audio files start playing straight away. In opera the files download. Internet explorer opens the files in windows media player. How can I make it so that when they are clicked they always download, instead of playing inside the browser?
    The only answer that I can find, so far, is zip files. I am reluctant to use that method because zip files compress and compression can do funny things to files.
    Can anyone suggest anything?
    Thanks
    Torhorhilau

    I am reluctant to use that method because zip files compress and compression can do funny things to files.
    Fear not. The zip compression is not a 'lossy' method, it's a simple statistical compression method (when three or more bytes are found adjacent in the file, they are replaced by two bytes, one indicating the repeating value, and the other indicating how many repeats), so the files will decompress exactly like they were before. A good example of a lossy compression would be when you create a jpg image.
    Alternatively, you could force a download with a little server-side scripting. Google "force download". You would need some proficiency in server scripting to use this method, however.

  • How can I get the video file to run correctly?

    To try to make a long story short, I was recording video using a capture card and adobe premiere and I ran out of room on the HDD and adobe premiere shut the recording down by its self, leaving me with a file that is right around 51gb in size (so i assume there is something in that file). But the thing is even though the file says its an avi file, ever program iv used to try to fix the file says it doesnt recognize the file as an avi file. I was wondering if there is a way to salvage the video file or am i stuck with a lead (51gb) weight of a file? if so, ill just delete it, but i would much rather get the file fixed... its the only copy of the video file that i have so it would be a realy wonderfull thing that i get the file fixed.

    One product that I have used, when there is a poorly formed AVI header is Digital Video Repair (cannot recall if it is freeware, or shareware), BUT it is likely that your file's header was NEVER written, so no amout of "repair" will succeed. Still, might be worth a try?
    With many AVI's, the header often comes first, where with some other formats, like MPEG-2 and WMV, the header is the last part of the file. Could be that the header of the AVI is just incorrect, such as with the Duration. Only a test will determine if you can repair the file.
    Good luck,
    Hunt

  • How do you make the fios optimizer tool work?

    I still have the release candidate of windows 7 running on this computer, and every time I use the fios optimizing tool, it never works. I have made sure to use internet explorer in administrative mode, but still. It will say that my computer is now optimized, but whenever I run a speed test (in which I get speeds lower that what I should be getting) it will always say at the bottom next to the red X that I should optimize it to make it faster. How do I make this work?

    Unless they changed it in the last couple of weeks the optimizer won't run on win7.

  • How can I make the fittext.js plugin work?

    Hello!
    I'm a newbie on Edge, so please bear with me.
    I've been trying to make the fittext.js plugin (http://fittextjs.com/) work on my project but is not doing anything in preview.
    This is what I have on my Stage on creation complete:
      yepnope( { load: "edge_includes/jquery.fittext.js" } );
    $("h1").fitText();
    I have my text elements as h1. I tried doing it with ids ( $("#title").fitText(); ) instead and I still get no result.
    Am I missing something?
    Thanks!

    Solved by adding Sarah's scale-to-fit code. Can somebody check the page here and give me some feedback? Thanks! http://wrongtarget.com/patria/
    My creationComplete looks like this now:
      yepnope(
              nope:[
              'edge_includes/jquery.fittext.js',
              complete: init
    sym.$("#Stage").css({ // Set the transform origin so we always scale to the top left corner of the stage
    "transform-origin":"0 0",
    "-ms-transform-origin":"0 0",
    "-webkit-transform-origin":"0 0",
    "-moz-transform-origin":"0 0",
    "-o-transform-origin":"0 0"
    function scaleStage() {
        var stage = sym.$('Stage'); // Set a reusable variable to reference the stage
        var parent = sym.$('Stage').parent(); // Set a reusable variable to reference the parent container of the stage
        var parentWidth = stage.parent().width(); // Get the parent of the stage width
        var parentHeight = $(window).height(); // Get the browser window height
        var stageWidth = stage.width(); // Get the stage width
        var stageHeight = stage.height(); // Get the stage height
        var desiredWidth = Math.round(parentWidth * 1); // Set the new width of the stage as it scales
        var desiredHeight = Math.round(parentHeight * 1); // Set the new height of the stage as it scales
        var rescaleWidth = (desiredWidth / stageWidth); // Set a variable to calculate the new width of the stage as it scales
        var rescaleHeight = (desiredHeight / stageHeight); // Set a variable to calculate the new height of the stage as it scales
        var rescale = rescaleWidth;
        if (stageHeight * rescale > desiredHeight) // Do not scale larger than the height of the browser window
                        rescale = rescaleHeight;
    // Rescale the stage!
               stage.css('transform', 'scale(' + rescale + ')');
         stage.css(  '-o-transform', 'scale(' + rescale + ')');
               stage.css('-ms-transform', 'scale(' + rescale + ')');
         stage.css('-webkit-transform', 'scale(' + rescale + ')');
               stage.css('-moz-transform', 'scale(' + rescale + ')');
         stage.css('-o-transform', 'scale(' + rescale + ')');
               parent.height(stageHeight * rescale); // Reset the height of the parent container so the objects below it will reflow as the height adjusts
    // Make it happen when the browser resizes
    $(window).on('resize', function(){
               scaleStage();
    // Make it happen when the page first loads
    $(document).ready(function(){
        scaleStage();
    function init() {
      fitText();

  • How do I make the mp4 file a little smaller?

    I've created some films and I need to get them under 10mb.  They are only slightly bigger than this at the moment.
    Any suggestions on what I need to do in the publish settings to make them a little smaller?

    Hello Rhian,
    Welcome to Adobe Forums!
    You can check the Compress SWF file and Advanced SWF compression option from the SWF size and quality under the EDIT> Prefrences menu before publishing.
    This will reduce the size but will also reduce the quality as well.
    Thanks and Regards
    HImanshu Satija

  • How do I make the time and date stamp correct for my documents, songs in itunes, etc.

    No matter when I add a song or save a document it says it was added/saved on 1/5/2011. It would be great if somehow I could get back the dates and times that things were added, but I know that may be impossible. I just want a way to have the correct time and date stamp from now on. Finally it wasn't always like this, when I first got the computer everything was correct, I just started noticing it. Additionally my clock is correct, so I don't understand why things aren't saved according to the clock. Thanks in advance

    Resetting your Mac's PRAM and NVRAM

  • How do I make this custom Style property work correctly?

    I'm trying to create a CSS style property that expects an
    mx:Effect object to be used in a custom AS class. I want to detect
    changes being made to the style property and assign the specified
    effect to an effect trigger belonging to a child of my custom
    component.
    Unfortunately, the specified mx:Effect object seems to be
    interpreted as a string instead of an mx:Effect object. Can anyone
    tell me what I need to correct for this to work as expected?
    You can see the compiled example
    here
    and review the source code below. It fails due to a
    "TypeError: Error #1034: Type Coercion failed: cannot convert
    "myTestEffect" to mx.effects.Effect.Style" in the custom
    components styleChanged function at the bottom of this post.
    EffectTest.mxml:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
    xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns:myComps="myComponents.*"
    layout="absolute"
    viewSourceURL="srcview/index.html"
    >
    <mx:Fade id="myTestEffect" alphaFrom="0.0" alphaTo="1.0"
    duration="1000"/>
    <mx:Style>
    MyCustomPanel {
    testEffect: myTestEffect;
    </mx:Style>
    <myComps:MyCustomPanel/>
    </mx:Application>
    myComponents/MyCustomPanel.as:
    package myComponents
    import mx.containers.Panel;
    import mx.effects.Effect;
    import mx.controls.Alert;
    [Style(name="testEffect", type="mx.effects.Effect",
    inherit="no")]
    public class MyCustomPanel extends Panel
    public function MyCustomPanel()
    super();
    override public function styleChanged(styleProp:String):void
    var allStyles:Boolean = !styleProp || styleProp ==
    "styleName";
    super.styleChanged(styleProp);
    if (allStyles || styleProp == "testEffect")
    var theTestEffect:Effect = getStyle("testEffect");
    if (theTestEffect)
    Alert.show("Effect assignment successful");

    Thanks for the quick response! I will definitely take your
    advice to work around the problem but your answer leads to more
    questions.
    I can specify effects via an instance when assigning them to
    effect triggers and it works without a problem, as seen below. How
    does it handle this at compile time?
    <mx:Fade id="rollOverFadeUp" alphaFrom="0.35"
    alphaTo="1.0" duration="250"/>
    <mx:Fade id="rollOutFadeDown" alphaFrom="1.0"
    alphaTo="0.35" duration="250"/>
    <mx:Style> // this is an external .css file in my app
    TextInput {
    rollOverEffect: rollOverFadeUp;
    rollOutEffect: rollOutFadeDown;
    </mx:Style>

  • How can I get the iCal server to work correctly?!

    We are a business that uses Apple software and products for everything! For a while we've been having an issue with iCal - it seems when an invite is sent we are unable to accept, we click 'accept' but the message is never sent, so then it looks like we're ignorning the request (which of course can look un professional). We have approached various IT companies and all they seemt o sugegst is using a different Mail Server (such as Kerio, Exchange etc) as a fix, which of course is quite costly, especially when we believe, that iCal should be  able to work effectively for a growing business.
    We've deleted users from the server, added them back on...the only way they can accept invites is if they keep it on the local calendar, which of course isn't any good to us as we share the calendars, therefore it needs to be on the server.
    I'm really hoping there is something someone out there can tell me to help us! I am loosing hope and I am reluctant to fork out for such costly solutions as Kerio when I know iCal server can work. Please help! If you need any further information please let me know.
    Thanks

    One product that I have used, when there is a poorly formed AVI header is Digital Video Repair (cannot recall if it is freeware, or shareware), BUT it is likely that your file's header was NEVER written, so no amout of "repair" will succeed. Still, might be worth a try?
    With many AVI's, the header often comes first, where with some other formats, like MPEG-2 and WMV, the header is the last part of the file. Could be that the header of the AVI is just incorrect, such as with the Duration. Only a test will determine if you can repair the file.
    Good luck,
    Hunt

  • How do i make a new file created appear in the Application Navigator?

    I am doing an extension to JDeveloper..How do i make the new file that the user has created to appear in the Application Navigator?
    What methods can i use?
    These are my codes...but it does not work still...
    File file = new File(dir ,fileName);
    file.createNewFile();
    FileWriter fw = new FileWriter(file, false );
    PrintWriter pw = new PrintWriter( fw, true );
    Workspace workspace = ctx.getWorkspace();
    java.net.URL projectURL = workspace.getActiveProjectURL();
    URL url = file.toURL();
    Node node = new Node(url);
    jpr.add(node, true);
    node.open();
    NavigatorManager.getWorkspaceNavigatorManager().openNavigator(ctx);
    ProjectNavigatorManager.getApplicationNavigatorManager().openNavigator(ctx);
    EditorManager.getEditorManager().openDefaultEditorInFrame(node.getURL());

    If it's an IMAP type account then you should get an Edit button at the top of the list of folders that you currently have on your email account. If it's a POP type account then you won't get the Edit button, and you are limited to your existing folders

  • Make the property file separate and remain just text file

    when I go "data" menu - "connect to Web Service..." to generate classes for webservice client,
    In the WSDL file the IP address is set.
    if the ip address doesn't vary, that doesn't matter at all.
    but I have to make client for general case which means the webservice server ip is not set, so I want make property file(text file) for IP address.
    if I compile the files(*.as) they compiled and include the ip address in it so I can't see any property file in the deployed folder.
    How can I make the property file separate and just change the ip address any time, any place.
    I used
    <mx:Metadata>
      [ResourceBundle("flex_dmb")]
    </mx:Metadata> 
    I don't know flex very well.
    I just click and click...
    Thanks.

    I use flex 4

  • HT4527 I transferred my library to a new laptop and everything appeared on the screen. I turned off the old computer and the library disappeared. How can I make it a permanent transfer as my old computer is being scrapped. Thanks

    I transferred my library to a new laptop and everything appeared on the screen. I turned off the old computer and the library disappeared. How can I make it a permanent transfer as my old computer is being scrapped. Thanks

    Hello Terryfrank,
    Congratulations on your new laptop!  Also, thank you for the details of the issue you are experiencing with transferring your iTunes Library to your new computer. 
    I notice that you are coming from the article “iTunes: How to move your music to a new computer,” and it sounds like you might have used the Home Sharing method outlined in that article. 
    With Home Sharing, you can stream content from another computer, and it sounds like that is how you have it currently set up.  The last step is to import the content to your new computer.  Use these steps on the new computer (while the old computer is on) to import the music to your new computer’s hard drive:
    Once your new computer sees the Home Share from your old computer, click that Home Share on the left side of iTunes on your new computer.
    Select the content in the Home Share that you want to transfer to your iTunes library on your new computer, or choose Edit > Select All to choose all of it. Then, click the Import button in the bottom-right corner of iTunes.
    Wait for the content to finish transferring.
    Additionally, if you want to transfer your playlists, you can export them from the old computer to the new computer:
    Transferring playlists
    If you want not only your content but also your playlists to exist on your new computer, you will want to transfer a copy of all your playlists from your old computer. To do this, choose File > Library > Export Library on your old computer. Save the XML file that is created to your desktop.
    Send the playlists file to yourself as an e-mail attachment, use an external drive, or use file sharing to move the playlists file to your new computer. Once the file is on your new computer, open iTunes and choose File > Library > Import Playlist. The import process will remove any items from the playlists that you didn't share via Home Sharing.
    iTunes: How to move your music to a new computer
    http://support.apple.com/kb/HT4527
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

Maybe you are looking for

  • BMR/Systemstate backup not working on windows server 2008 error 2147942487

    Hi, trying to backup system image using SCDPM 2010 RTM.Most of the server are getting healthy backups except for this one server which is giving error: Affected area: Computer\System Protection Occurred since: 1/27/2014 2:43:27 PM Description: The re

  • Playing Files off My Creative Zen Vision:M 30 GB On my Compu

    Yes Id like to be able to listen to the music off my zen on my computer, I know theres a player but id like to get something more simple and more straight foward. Something simular to windows media player, or that might even due. Ive tried though to

  • Very simple CSS problem - ive given up :(

    please help a brother out:( im desinging a page with 3 separate HTML files, and a PHP file calling them. problem: i cannot get rid of 1px space in top margin :( i have tried everything ps! top-margin: -1px doesnt work my website link: http://www.heat

  • Installing Windows Server 2012 on W510

    I realize this is not likely to be a common scenario, nor a supported one. I'm installing Windows Server 2012 (Evaluation edition) on a w510 to use as a learning lab. In case anyone else decides to head down this road I've documented what I've run in

  • Printing contact's name as well as company name

    Hi, I find that when printing labels, I cannot print the contacts name and the company name on the same label. The name is there on the contact's entry but it doesn't print. Any ideas please?