Webutil_file_transfer and webutil_db_local

Hello
I'm trying to use WEBUTIL_FILE_TRANSFER.CLIENT_TO_DB to upload a file into a blob column in the database.
While debugging, in the function WEBUTIL_FILE_TRANSFER.UploadInt the following line of code exists:
if not WebUtil_DB_Local.openblob(spec1, spec2, spec3,'W', m_maxTransferSize) then ...
When I step into this function, this is what I see:
PACKAGE BODY WEBUTIL_DB_LOCAL IS
FUNCTION OpenBlob(blobTable in VARCHAR2,
blobColumn in VARCHAR2,
blobWhere in VARCHAR2,
openMode in VARCHAR2,
chunkSize in PLS_INTEGER default null) return BOOLEAN is
BEGIN
raise form_trigger_FAILURE; -- BY AN 30/6/2009, IT WAS WITHOUT THE "_local"
return WebUtil_DB_local.OpenBlob(blobTable,
blobColumn,
blobWhere,
openMode,
chunkSize);
END OpenBlob;
Do I have something wrong with my installation or something?
Thanks in advance for any help.

That is exactly what Andreas is saying. Here is the code for the OpenBlob function in my WebUtil.pll.
  FUNCTION  OpenBlob(blobTable  in VARCHAR2,
                     blobColumn in VARCHAR2,
                     blobWhere  in VARCHAR2,
                     openMode   in VARCHAR2,
                     chunkSize  in PLS_INTEGER default null) return BOOLEAN is
  BEGIN
    return WebUtil_DB.OpenBlob(blobTable,
                             blobColumn,
                             blobWhere,
                             openMode,
                             chunkSize);
  END OpenBlob;                     This line: raise form_trigger_FAILURE; -- BY AN 30/6/2009, IT WAS WITHOUT THE "_local" should not be there.
Craig...

Similar Messages

  • Webutil_file_transfer and host command doesn't work

    I use a host command in forms to execute a sql-script, which creates a file on AS. After the host command I use webutil_file_transfer to ftp the created file to the client. If I try to do this again in the same session, the host command fails. I have to restart the application to get it working again. If I leave out the webutil_file_transfer I have no problems whatsoever. It looks like webutil is changing something perhaps in the environment. Anyone has the same problem (and a suitable solution)?

    I can remove the files on AS (so there seems to be no lock). After removal of the files, no new files wil be created, even if I change the name of the file that needs to be created. Only restarting the application helps.
    Raoul

  • PROBLEMS USING WEBUTIL_FILE_TRANSFER AND CLIENT_HOST COMMAND TO VIEW BLOB

    I am using webutil_file_transfer.DB_To_Client_with_progress to retrieve a blob
    from the database (that was saved in a word format) into a .doc file on the
    client.
    1st problem: The document that is being saved is not readable. It has all
    kind of special characters in it.
    Then using the client_host command, I open the document into ms word.
    2nd problem: The document opens fine (again not readable in garbage
    characters) but when I close the document, notepad pops up blank with nothing
    in it.
    Below is a sample of the code.:
    PROCEDURE DOWNLOAD_DB IS
    l_success boolean;
    username varchar2(30);
    document_name varchar2(20);
    wordexe varchar2(20);
    BEGIN
         username := webutil_clientinfo.get_user_name;
         document_name := 'wo'||:wod.fk_work_order_number||'.doc';
         :locals.file_name := 'Documents and Settings\'||username||'\my documents\'||document_name;
    l_success := webutil_file_transfer.DB_To_Client_with_progress
    (clientFile => 'C:\'||:locals.file_name
    ,tableName => 'DEFECTS'
    ,columnName => 'DESCRIPTION'
    ,whereClause => 'FK_WORK_ORDER_DATE_ID = '||:DEF.FK_WO_DATE_ID
    ,progressTitle => 'Defect document being opened'
    ,progressSubTitle=> 'Please wait'
    if l_success
    then
    CLIENT_HOST('cmd /c start /wait winword.exe C:\'||'"'||:locals.file_name||'"');
    else
    message('File download from Database failed');
    end if;
    exception
         when others
         then
         message('File download failed: '||sqlerrm);
    END;
    Any ideas?

    Hello,
    I use this kind of code with 9i and 10g and it works fine with word, excel and any of windows files.
    I think that, if the file is not correct, the cause may be the first save of the file in the database.
    Which instruction did you use to save first the doc in the BLOB column ?
    Francois

  • Webutil_file_transfer consuming a lot of memory and doesn't release...

    I'm facing a problem with webutil_file_transfer.client_to_as_with_progress when I'm transferring many files from the client to the server. Suddenly webutil stops the transferring and webutil doesn't work until I've restarted the form.
    I've noticed that the frmweb.exe process is increasing it's memory usage while traferring the files. When it reaches about 90-100mb memory in use - webutil "explodes".
    It looks like webutil doesn't relase the ressources after the file has been transferred to the server.

    I've found a workaround to this "bug".
    Instead of calling webutil_file_transfer..... directly in the code - I open a new form with call_form, activates a timer in the when_new_form_instance trigger - which makes the call to webutil_file_transfer - and then closes the form.
    Now webutil is releasing the ressources, because the form which made the webutil-call i closed after each call.

  • Webutil_file_transfer url_to_client places objects in the Java Cache

    Hi,
    I'm using webutil_file_transfer url_to_client to download a PDF file.
    Once I downloaded the PDF file, it is visible in the Client Java Cache Viewer. When I try to run the download again webutil takes the PDF from the Cache instead taking the newer PDF from the Server where the URL is pointing to.
    So the URL I passing is each time the same, but the PDF file on the Server is getting updated very often.
    I don't usethe WEBCACHE port!
    My question now is. Can I avoid webutil to put does PDF file in the Java Cache on the Client. Or is there any utility to remove selected objects from the Java Cache.
    Does anybody have a Idea how to avoid such a behaviour?
    Fatih

    Hi Craig,
    with the help of Oracle Support, we found the reason and also a workaround for this issue.
    The real cause:
    By default the java applet parameter DefaultUseCaches is true an all files downloaded within an applet is going throug the Java Client Cache.
    WEBUTIL does not touch this parameter, so it keeps staying default (true).
    Solution/workaround:
    With the methode setDefaultUseCaches it possible to disable/enable the default Cache setting.
    So it's possible to disable the cache with a small Java Bean running in Forms, which disable the Cache before WEBUTIL_FILE_TRANSFER and enable it after the successfull download.
    here is an extract of the bean code:
    URL u = new URL( "http:" );
    URLConnection uc = u.openConnection();
    uc.setDefaultUseCaches(false);
    thank you for your time!
    regards,
    Fatih

  • How to use CLIENT_TEXT_IO more fast?

    Hello,
    I'm using new features for Forms 10g like WebUtil, but I can't fine work with file manipulation - CLIENT_TEXT_IO.
    The loading of the text file with 7mb size, delay 15-30 minutes, is not good.
    I like know one other way for this works more fast, anybody help me?
    I tried using Java for replace WebUtil commands (CLIENT_TEXT_IO), but, my java class, works as a client program. I accept others forms to resolve this problem, but, I look for solutions using WebUtil, if is possible.
    Thanks in advanced.

    It seems the implementation of CLIENT_TEXT_IO is not optimal, refer to the webutil manual for performance improvement.
    http://www.oracle.com/technology/products/forms/htdocs/webutil/web_util.pdf - page 6-1.
    Use functions in an efficient manner. For instance if you need to read a text file on
    the client computer, it will probably be more efficient to transfer the file to the
    users’s work area using WebUtil_File_Transfer and then read it with normal
    TEXT_IO, rather than reading it line by line across the network

  • Webutil_file_transfer needed btw AS and DB

    As I posted in May 04, the header of the webutil_file_transfer package spec says:
    * TODO:
    * 2) Add functionality to Upload / Download from App Server Filesystem to / from the Database
    This would be VERY useful in cutting out redundant slow transfers. I want to populate a db blob with contents derived from a template doc and db items, and the only way I've found is to:
    a) copy the template on AS to a temp file on AS;
    b) edit the temp file using OLE2
    c) download the edited file, as_to_client
    d) upload it, client_to_db
    I'd like to replace c) and d) with a single call of "AS_to_DB".
    Is Oracle going to provide "AS_to_DB" and "DB_to_AS"? If not, could anyone suggest how we might do it for ourselves?
    Thanks,
    John D

    Hi Grant,
    You could check out <Note:74143.1>I don't see its relevance.
    webutil equivelant would involve you loading to the
    client and then you could do client to d/b - but of
    course that would be a long way around the houses!!!
    ;o)
    This is the long way round the houses for which 'AS_toDB' would be the shortcut.
    I do agree it would be very useful to have and you
    could certainly use some of the webutil features to
    extend it yourself.Since it would be very useful, I don't see why Oracle doesn't provide it. The least-effort max-gain route would be for the original author to do the development, since a) he knows what the original code is doing, and the new functions would be b) proof against future re-releases and c) available to all.
    Since this isn't going to happen, it's guidance on how to do it myself that I'm looking for.
    Thanks,
    John

  • Webutil_file_transfer.AS_To_client

    Hello,
    The webutil_file_transfer.AS_To_client only works in ascii mode. Therefore on Unix we add the command unix2dos to workaround this problem.
    The code is as follows:
    if upper(get_application_property(operating_system))
    not like '%WIN%'
    then
    host('unix2dos '||g_ap_directory||g_file_name
    ||' '||g_ap_directory||g_file_name);
    end if;
    if not webutil_file_transfer.AS_To_Client
    ( user_preferences.get_output_directory||g_file_name
    , g_ap_directory||g_file_name
    then
    end if;      
    This works fine the first time the code is executed. The second time the code fails. The unix2dos does not do the job. When we do not do the file transfer it does work ok.
    Looks like the webutil_file_transfer.AS_To_Client prevents other actions on the AS.
    Any ideas?
    Regards Erik

    You may need to clear your variables and find some way to reset everything after the function is complete. That would be my first guess. Nothing is jumping out at me from the code at the moment.

  • Webutil_file_transfer causes blank forms window on second monitor

    Hi,
    Forms 11.1.2.0.0 64 bit
    Java 1.6.0_31
    When using webutil_file_transfer.client_to_db_with_progress or db_to_client_with_progress to load/view a document an intermittent fault occurs. If the Forms window is running on a second monitor then the forms window goes blank while the document up/downloads, and does not return unless dragged to the first window. The problem does not occur every time, and never when only one monitor is used. Maximizing the forms window also seems to cure the problem, but this is not a feasible option.
    Any help greatly appreciated.
    Nick.

    Hi,
    Forms 11.1.2.0.0 64 bit
    Java 1.6.0_31
    When using webutil_file_transfer.client_to_db_with_progress or db_to_client_with_progress to load/view a document an intermittent fault occurs. If the Forms window is running on a second monitor then the forms window goes blank while the document up/downloads, and does not return unless dragged to the first window. The problem does not occur every time, and never when only one monitor is used. Maximizing the forms window also seems to cure the problem, but this is not a feasible option.
    Any help greatly appreciated.
    Nick.

  • Problem using webutil_file_transfer.AS_to_Client

    I have configured webutil package successfully
    I have made the following configuration to webutil.cfg:
    transfer.database.enabled=TRUE
    transfer.appsrv.enabled=TRUE
    transfer.appsrv.accessControl=TRUE
    #List transfer.appsrv.read.<n> directories
    transfer.appsrv.read.1=c:\temp
    #List transfer.appsrv.write.<n> directories
    transfer.appsrv.write.1=c:\temp
    I have the following code:
    BEGIN
         IF NOT webutil_file_transfer.AS_to_Client('C:\temp\saad.pdf', 'C:\temp\saad.pdf') THEN
              message('Upload was not successful');
         ELSE
              message('Upload was successful');
         END IF;
    END;
    I always got "Upload was not successful" can any body tell me what the problem is ?

    Francois Degrelle wrote:
    - be sure that the first argument is the client machine file and the second the server file
    FRancois
    It is OK
    Francois Degrelle wrote:
    - at runtime, display the Java console to see if there is any error message
    FRancois
    No Errors
    Francois Degrelle wrote:
    - try another function in the Webutil_File_Transfert package
    FRancois
    I have tried client_to_db successfully

  • Problem using WEBUTIL_FILE_TRANSFER

    I am using WEBUTIL_FILE_TRANSFER to load documents into a table and then open them for editing. I have followed the general form of the demos in WEBUTIL_DOC.fmb. I can transfer a document to the database and save it. I transfer the document back to the client for editing and resave it repeatedly.
    However, when I add a second row to the table and add a second object, the first object seems to go away. When I try to transfer the first object back to the client for editing using DB_TO_CLIENT, I get WUT-110 LOB of zero length. The second object is okay.
    Does anyone know why that would be happening?

    Harm,
    I get the same error here, but my file is not being uploaded.
    You need to provide a string to the progressSubtitle parameter of the client_to_as_with_progress function, not only ''.
    This works for me.
    HTH
    Gerald

  • Webutil usage on Windows and Unix clients - Host and Temp dir issues

    Hello,
    I am in the process of writing a Forms application which makes use of WebUtil to handle the uploading and downloading of files, as well as launching the files on the client PCs. The code below is my current 'Launch' program which works great in a Microsoft Windows environment. It gets the TEMP directory location, builds a file name, downloads the file to the TEMP directory and uses the Host command to launch the file.
    PROCEDURE Launch_DB IS
    l_directory varchar2(200) := client_win_api_environment.get_temp_directory(true);
    l_success boolean;
    BEGIN
    :file_block.full_file_name := l_directory || '\' || :file_block.file_name;
    l_success := webutil_file_transfer.DB_To_Client_with_progress
    (clientFile => :file_block.full_file_name
    ,tableName => 'FILES
    ,columnName => 'FILE_DATA'
    ,whereClause => 'ID = ' || :file_block.id
    ,progressTitle => 'Download from Database in progress'
    ,progressSubTitle=> 'Please wait'
    if l_success then
    WEBUTIL_HOST.NONBLOCKING('CMD /C "' || :file_block.full_file_name || '"');
    else
    exception
         when others then
         message('File download failed: '||sqlerrm);
    END;
    My problem is that I've just discovered that there's a new group of users that will want access to these forms, and they're using non-windows machines - mostly Solaris and Linux. As such, I have these problems:
    - " client_win_api_environment.get_temp_directory " is a Microsoft Windows specific function. Is there any way to determine a temporary storage area on a Unix machine?
    - " WEBUTIL_HOST.NONBLOCKING('CMD /C "' || :file_block.full_file_name || '"'); " - CMD is Microsoft Windows specific function. What should I do to launch a file from Unix? (Sorry, my Unix skills are pretty minimal).
    - I'm guessing that I'll need to determine the operating system so that I can use different methods to determine the TEMP dir, and to execute the HOST command. Assuming that Microsoft Windows and Unix variants are the only OS's that I need to provide access to, what is the best way to determine the client environment ( eg. IF UPPER(WebUtil_ClientInfo.Get_Operating_System) like '%WINDOWS%' THEN ... ELSE ... END IF; ) . I only have access to Windows XP for testing so I don't know what values "WebUtil_ClientInfo.Get_Operating_System" will return for any other OS.
    Thanks in advance for any assistance.
    Regards,
    Michael.

    Hi,
    as far as launching the file goes, if teh program that runs the file exist on teh local computer, you can use teh host command in webutil to access teh program and file. CMD is what you use to open teh command line on windows, but the host command is supposed to work on the UNIX client as well.
    For the temp directory, you have two options
    The short term option: Pass the temporary directory name as a user variable to Forms when starting the application. This can be user specific if adding this information to the URL using teh otherparams parameter
    The longterm option: Log a TAR with Oracle customer support to add a function to teh getClientInfo function that retruns the temporary directory for the authenticated user.
    Frank

  • Webutil and support issues

    Hi,
    1: "Pick a forum", a game for young and old.
    I haven't posted here before because I've traditionally used the Metalink Forms forum. On failing to get problems resolved there, I've occasionally escalated by raising a TAR. A recent TAR concerned Webutil so I was phoned by a very friendly Support analyst who told me they couldn't help (webutil's still beta), and I should post my comments (see below) here in the 'discussion' forum, because "the product managers read them".
    Are the Metalink forums and Discussion forums related in any way? If not why not, and how do I search for help efficiently? (It's only databases, right?) Which forum gives me a better chance of an authoritative answer?
    2: It would be very useful to be able to write blob data to the App Server. Are there any plans to provide "webutil_file_transfer.db_to_AS"? If so, good, when? If not why not?
    3: Webutil support (TAR extract):
    I think Oracle ... has made a mess. We're encouraged to go Forms 9i because client-server is dying, and must not only pay heavily for the privilege but find once we're there that:
    a) forms plus webutil cannot do everything 6i could. YOUR APP MAY NO LONGER WORK.
    b) not all webutil calls work - yet (e.g. delete_file - awaiting a fix at 1.0.3, whenever that's due)
    c) webutil is not supported at 9i
    d) the webutil documentation (webutil_manual.pdf) is substandard - the only way to deduce details of the (misnamed) procedures is to examine the pll directly and guess how to use them.
    e) the only support is via Metalink, and the only response you get there is 'you can use webutil, read the documentation'. Loop to a).
    You could save your users a lot of time (=money) and grief by sticking something similar to the following in all relevant documentation (and passing it on to the Metalink folk):
    Webutil limitations:
    1) Webutil cannot be used to read or write BLOB data directly.
    2) To open a BLOB in an application, you must use webutil's file transfer functions to download to the client (NB NOT the App Server), then use e.g.
    web.show_document(<filename>?mimetype=<whatever>)
    3) To edit a BLOB, the user must download it, make changes then manually
    re-upload.
    Finally I'd like to second some comments in other posts about the webutil file_select and file_open dialogs: they confuse users by behaving in a non-Windows manner, and in my experience are unusably slow when exploring large folders.
    All responses most welcome.
    JD

    Thank you for your comments- maybe I can address your concerns.
    As is stated in the webutil FAQ - webutil "[webutil] is delivered as a preview release and as such is not yet a fully integrated and supported feature of Oracle9i Forms. However, help is provided by the use of the Forms forum."
    So, this is correct forum on which to be posting your webutil question.
    With respect to your second question about moving blob data to the application server - this is not really within the realms of what webutil is targetting since the need to write data from the database to where the Forms runtime is running is the exact same when running client/server or running on the web.... webutil tends to target those differences in moving to a 3 tier architecture.
    a) There are some difference in architecture between c/s and web and as such there are some limitations. These have been well documented and workarounds indicated.
    b) I assume you refer to bug:<Bug:3151674> which is fixed and in the production candidate release which is documented in the webutil FAQ when this will be released.
    c) Correct - it will be formally supported in 10g - please note however that for Forms 10g is regarded as a minor release to 9i (so you gain many benefits for a minor release change)
    d) Please feel free to post specific comments and we can address these (the misnamed procedure has been fixed).
    e) Until production, support is through the forum.
    Regarding the file selection - while you are running on a windows machine you must be aware that the client is actually running in a JVM and so is essentially a Java client. There has been an enhancement request to make this a windows specific dialog.
    Could I also draw your attention to http://otn.oracle.com/oramag/oracle/04-mar/o24news.html which documents the great benefit that webutil has brought to a particular development.
    Regards
    Grant Ronald
    Forms Product Management

  • Webutil and ORA-06508

    Sometimes, but not always I am getting ORA-06508 when using Webutil. But I am only getting this error when calling webutil_file_transfer.client_to_as_with_progress
    I aslo use webutil_clientinfo, and that works just fine.
    /Vidar

    You don't find what ?
    Open the webutil.pll in the Forms Builder, then compile it then generate the executable with Ctrl+T
    Francois

  • Webutil_file_transfer.url_to_client: How to open in a browser?

    Hi,
    I have succeeded in running webutil from the server, but the page is downloaded as a file on my client machine.
         lb_url := webutil_file_transfer.url_to_client('http://www.oracle.com', 'c:\cf', null);
    I would like to have the second argument to run a browser to see the page dynamically.
    How could I do that?
    Many thanks for your help.
    Edited by: JeanParis on May 25, 2011 12:01 PM

    I did
    declare
    stnd WEBUTIL_HOST.OUTPUT_ARRAY ;
    error WEBUTIL_HOST.OUTPUT_ARRAY ;
    process WEBUTIL_HOST.PROCESS_ID ;     
    id_session_telephone varchar2(4000);
    commande_tel varchar2(2000);
    lv_guill varchar2(10) := chr( 34 );
    begin
    commande_tel := 'iexplore ' || lv_guill || 'http://www.oracle.com' || lv_guill;
    process := WEBUTIL_HOST.Blocking(commande_tel);
    exception
         when others then
         lib_alert( 'Exc en W B P Telephone: ' || sqlerrm );
    end;
    And it worked!
    The calls to webutil were initially meant to dial a client number, but it did not work so I use simply ' host ' instead.
    Many thanks

Maybe you are looking for

  • Session problem in JSP

    Good day to all! I have a JSP that generates an Excel document. I used the application/vnd.ms-excel in the contentType so that IE automatically opens Excel. I noticed that if I use IE 5.5 or 5, the data in the session, that I'm suppose to display in

  • What are the differences between the Caching and the Software Update Services

    New to working with OS X Server and am confused about the differences between the Caching Service and the Software Update Service...it seems to me that they overlap in that i) the Caching Service updates OS X software, iOS software and any apps purch

  • LMS Ver 4.0.1 unable to set error count options

    I have a recent new install of Cisco Works and all is working fine.  My issue is with a feature that doesn't seem to be present.  When I create a report to ccheck on sys logs the report returns all sys log whether they are repetitive or not.  Is ther

  • Strange Limiter/Mixer problem?

    When I insert a limiter on a channel and turn up the gain on the limiter, it will show -3db on the mixer. No matter how high I push the gain into the limiter, the mixer value will never go higher than -3db. I am running Logic 7.2 on a Mac Pro and the

  • How to download the latest compatible version of hp smart print

    how do i download the latest compatible version of hp smart print and how do i get to a live chat person