FORM_SUCCESS???

Hi,
I am using forms 6i.
In my code after doing some insert & update code, I use FORM_SUCCESS to check
wheather my forms has no errors.
Is there any possibilty missing the errors by using FORM_SUCCESS ?
Thanks
Regards,
Manoj

Ideally not.

Similar Messages

  • USE OF FUNCTION FORM_SUCCESS

    Hi,
    Can any one please tell me if i can use FORM_SUCCESS with CLIENT_HOST command?
    The code is as follows.
    l_host_cmnd := ' ftp –s:' || l_ftp_destination || '/' || 'temp.txt';
    HOST( l_host_cmnd, NO_SCREEN);
    if not form_success
    then
    message(The file has not been trasfered');
    do_key ('EXIT_FORM');
    end if;

    Hi,
    Are you using Client_Host from WebUtil, or just Host? Your message is slightly ambiguous.
    WebUtil provides more specific functions for getting the return value, and standard output/error. You can avoid using Form_Success.
    If this instance, you could say:
    l_host_cmnd := ' ftp –s:' || l_ftp_destination || '/' || 'temp.txt';
    l_ftp_retval := WebUtil_Host.HOST(l_host_cmnd);
    if l_ftp_retval = 0 then
      message('Success');
    else
      -- start handling the errors
    end if;Even if you are using HOST, this will help you sometime in the future.
    Cheers

  • Java bean setproperty and form_success

    Hi,
    i have a javabean and getproperty-setproperty methods.
    setproperty returns true or false.
    my question is : does returning false from setproperty method affects form_success control after set_custom_property?
    if it does not affect form_success how can i check if an error occured at java bean?
    thanks in advance.
    Regards , Engin

    hi,
    as a result returning true or false does not mean anything to forms application.
    also i can't use
    throw new Exception("Error occured.");
    statement at set_property method, compiler says unhandled exception. if i put throws clause at set_property then compiler says uncompatible with set_property at vbean class.
    maybe setting a variable as result and getting its value by get_property should be a solution.
    any other possibilities???
    Regards, Engin.

  • Shell commands from JSP after Forms migration

    During application migration from forms 9i to JSP & BC4J, I have to code the following Forms code into my JSP application.This is for a button pressed trigger.
    DECLARE
    RENAME_STRING VARCHAR2(120):= 'RENAME C:\BRC\PDATA' ||:DRAWING_ACCOUNTS.ACCOUNT_ID|| '.TXT P' || :DRAWING_ACCOUNTS.ACCOUNT_ID || TO_CHAR(SYSDATE,'DDMMYY')|| '.txt';
    BEGIN
    HOST( RENAME_STRING, no_screen );
    web.show_document( 'http://hostname/selectfile.html', '_new');
         IF NOT Form_Success THEN
              Message('Error -- File not Renamed.');
         END IF;
    END;
    How can I do this simple sending of OS commands in JSP, any ideas?

    Hi,
    Not only rename commands but I have to pass several other os commands like 'sqlldr' for data upload as well. Therefore, I need a reusable piece of code for that. I have acheived some way for that using the following code.
    put the following file in that package.
    package BankrecBC4J;
    import java.util.*;
    import java.io.*;
    import java.net.*;
    import java.text.*;
    import java.util.zip.*;
    class StreamGobbler extends Thread
    InputStream is;
    String type;
    StreamGobbler(InputStream is, String type)
    this.is = is;
    this.type = type;
    public void run()
    try
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line=null;
    while ( (line = br.readLine()) != null)
    System.out.println(type + ">" + line);
    } catch (IOException ioe)
    ioe.printStackTrace();
    public class GoodWindowsExec
    private static final boolean NATIVE_COMMANDS = true;
    //Allow browsing and file manipulation only in certain directories
         private static final boolean RESTRICT_BROWSING = false;
    //If true, the user is allowed to browse only in RESTRICT_PATH,
    //if false, the user is allowed to browse all directories besides RESTRICT_PATH
    private static final boolean RESTRICT_WHITELIST = false;
    //Paths, sperated by semicolon
    //private static final String RESTRICT_PATH = "C:\\CODE;E:\\"; //Win32: Case important!!
         private static final String RESTRICT_PATH = "/etc;/var";
         * Command of the shell interpreter and the parameter to run a programm
         private static final String[] COMMAND_INTERPRETER = {"cmd", "/C"}; // Dos,Windows
         //private static final String[] COMMAND_INTERPRETER = {"/bin/sh","-c"};      // Unix
         * Max time in ms a process is allowed to run, before it will be terminated
    private static final long MAX_PROCESS_RUNNING_TIME = 30 * 1000; //30 seconds
         //Normally you should not change anything after this line
         //Change this to locate the tempfile directory for upload (not longer needed)
         private static String tempdir = ".";
         private static String VERSION_NR = "1.1a";
         private static DateFormat dateFormat = DateFormat.getDateTimeInstance();
    public GoodWindowsExec(String g)
    System.out.println(" hello " + g);
    /*if (g.length < 1)
    System.out.println("USAGE: java GoodWindowsExec <cmd>");
    System.exit(1);
    try
    String osName = System.getProperty("os.name" );
    String[] cmd = new String[3];
    System.out.println("here ");
    if( osName.equals( "Windows NT" ) )
    cmd[0] = "cmd.exe" ;
    cmd[1] = "/C" ;
    cmd[2] = g;
    else if( osName.equals( "Windows 2000" ) )
    System.out.println("Windows 2000");
    cmd[0] = "command.com" ;
    cmd[1] = "/C" ;
    cmd[2] = g;
    else if( osName.equals( "Windows XP" ) )
    System.out.println("Windows XP");
    cmd[0] = "command.com" ;
    cmd[1] = "/C" ;
    cmd[2] = g;
    else if( osName.equals( "Windows 95" ) )
    cmd[0] = "command.com" ;
    cmd[1] = "/C" ;
    cmd[2] = g;
    Runtime rt = Runtime.getRuntime();
    System.out.println("Execing " + cmd[0] + " " + cmd[1]
    + " " + cmd[2]);
    Process proc = rt.exec(cmd);
         * Starts a native process on the server
         *      @param command the command to start the process
         *     @param dir the dir in which the process starts
    // any error message?
    StreamGobbler errorGobbler = new
    StreamGobbler(proc.getErrorStream(), "ERROR");
    // any output?
    StreamGobbler outputGobbler = new
    StreamGobbler(proc.getInputStream(), "OUTPUT");
    // kick them off
    errorGobbler.start();
    outputGobbler.start();
    // any error???
    int exitVal = proc.waitFor();
    System.out.println("ExitValue: " + exitVal);
    } catch (Throwable t)
    t.printStackTrace();
         * Converts some important chars (int) to the corresponding html string
         static String conv2Html(int i) {
              if (i == '&') return "&amp;";
              else if (i == '<') return "&lt;";
              else if (i == '>') return "&gt;";
              else if (i == '"') return "&quot;";
              else return "" + (char) i;
    static String startProcess(String command, String dir) throws IOException {
              StringBuffer ret = new StringBuffer();
              String[] comm = new String[3];
              comm[0] = COMMAND_INTERPRETER[0];
              comm[1] = COMMAND_INTERPRETER[1];
              comm[2] = command;
              long start = System.currentTimeMillis();
              try {
                   //Start process
                   Process ls_proc = Runtime.getRuntime().exec(comm, null, new File(dir));
                   //Get input and error streams
                   BufferedInputStream ls_in = new BufferedInputStream(ls_proc.getInputStream());
                   BufferedInputStream ls_err = new BufferedInputStream(ls_proc.getErrorStream());
                   boolean end = false;
                   while (!end) {
                        int c = 0;
                        while ((ls_err.available() > 0) && (++c <= 1000)) {
                             ret.append(conv2Html(ls_err.read()));
                        c = 0;
                        while ((ls_in.available() > 0) && (++c <= 1000)) {
                             ret.append(conv2Html(ls_in.read()));
                        try {
                             ls_proc.exitValue();
                             //if the process has not finished, an exception is thrown
                             //else
                             while (ls_err.available() > 0)
                                  ret.append(conv2Html(ls_err.read()));
                             while (ls_in.available() > 0)
                                  ret.append(conv2Html(ls_in.read()));
                             end = true;
                        catch (IllegalThreadStateException ex) {
                             //Process is running
                        //The process is not allowed to run longer than given time.
                        if (System.currentTimeMillis() - start > MAX_PROCESS_RUNNING_TIME) {
                             ls_proc.destroy();
                             end = true;
                             ret.append("!!!! Process has timed out, destroyed !!!!!");
                        try {
                             Thread.sleep(50);
                        catch (InterruptedException ie) {}
              catch (IOException e) {
                   ret.append("Error: " + e);
              return ret.toString();
    In the first line of the JSP file include the package
    <%@page import="BankrecBC4J.*" %>
    and call
    it this way:from the jsp page
    new GoodWindowsExec ("calc"); //
    which should open up the calciulator, and should do for other os commands as well.
    Thanks

  • How to know if commit_form is successful

    Hi
    I am new with Oracle Forms.
    I am developing an application using Oracle 10g express and forms 6i.
    Can somebody please guide me regarding code under SAVE button(I have placed some push buttons on form for add_new, Save, Reset ect).
    I am trying to handle DUPLICATE_RECORDS AND NULL_VALUES through this code which is in ON_ERROR form trigger
    declare
    x number;    
    begin
    if dbms_error_code in (-1400, -1407) then
         x:=show_alert('alert_Empty');
       raise form_trigger_failure;
    elsIF dbms_error_code='-00001' then
         x:=show_alert('alert_duplicate');
       raise form_trigger_failure;
    end if;
    end;
    and code under SAVE button is
    declare
    a number;
    begin
               commit_form;
                a:=show_alert('alert_Saved');
                clear_form(NO_VALIDATE);
                raise form_trigger_failure;   
    but even form is prompting for duplicate value or null value, Alert_save is showing as record has been saved.
    My question is how I can be sure that record has been saved actually?????
    I have tried to check :SYSTEM.FORM_STATUS and it return CHANGED .
    is there any approach I should use, any sample piece of code will be much appreciated.
    regards.
    end;

    Well, looking at the Forms Help System, (FORM_SUCCESS built-in) they give an example of how to test if the commit was successful.
    IF Form_Success THEN
      Commit;
      IF :System.Form_Status <> 'QUERY' THEN
        Message('Error prevented Commit');
        RAISE Form_Trigger_Failure;
      END IF;
    END IF;
    Craig...

  • Need_help_in_making_a_password_changing_module

    hi all,
    i need help in making a module where users can change password. for this i need help how to authenticate the old password and how to encrypt the password characters...
    waiting for help...
    i use Forms [32 Bit] Version 10.1.2.0.2 (Production)
    regards

    hi
    thanks Abdetu and Andreas Weiden. thanks to both of u for ur kind help. the following code did my job but by now another problem has risen.
    my project calls different forms from the main_form. when i change the password via the following code, the password is not refreshed into the session information, due to which i can not move between different modules. the form simply collapses.
    can u people please suggest something to fix it up....?
    hoping for help,
    regards...
    Forms_DDL ('ALTER USER '||:MAIN_ITEMS.CURR_USER||' IDENTIFIED BY ' || :CHANGE_PASS.NEW_PASS);
                   IF Form_Success THEN
                        a := SHOW_ALERT ('SUCCESS');
                        :CHANGE_PASS.OLD_PASS := NULL;
                        :CHANGE_PASS.NEW_PASS := NULL;
                   :CHANGE_PASS.CONFIRM_NEW_PASS := NULL;
                   END IF;

  • Forms HOST command no longer works after database upgrade from 10g to 11g

    Hi,
    After upgrading the database 10g to 11g the forms HOST command no longer works on Unix server. The form used to work fine prior the upgrade. I read all the threads I could find and did not see any solutions. Adding PATH and LD_LIBRARY_PATH does not work because it does not even run a basic shell script. (I saw this solution, adding PATH and LD_LIBRARY_PATH, in many questions / threads).
    1. I wouldn't expect the database upgrade to be an issue, but it is the only change we had.
    2. Note, 11g is Oracle Fusion Middleware which is quite a bit different than 10g.
    I even tried the most basic commands like "echo" which is a build-in Unix command and there is no directory for it (ie. no /usr/bin - so variable PATH is irrelvent). i.e HOST('echo hi'); and HOST('echo "hi" '); and even HOST ('echo hi > /my_file.txt'); all returns FORMS_FAILURE (actually the if is IF FORM_SUCCESS THEN ... else ... and the else part always runs now - whereas it didn't before.).
    Or basic commands like /usr/bin/ls as in HOST(/usr/bin/ls). At that point I was just testing the Unix command would return FORM_SUCCESS even though I could not see the results (because they weren't writing to a log file). Notice that I'm using the direct path /usr/bin so no Unix environment variables were needed.
    The form does use webutil but that part works. For example, we have webutil_file_transfer( ....) The file shows up on the application server and in the expected directory.
    Here's the main goal. Upload a file from clients local PC to the datebase server. The form uploads the file to the Application server, then we have a Unix script to scp (secure copy) the file from the application server to the database server. IF webutil, or any other Oracle functions could put the file on the database server that would be better. But, I don't know of any procedures that do that - or would have done it cleanly (i.e. storing to database and write back to server and then using a blob etc. )
    Anyway, I was hoping someone would help with either of these.
    1) Get the HOST command to work. - If we can get that to work then I wouldn't need any more help. We can just call the already existing Unix script to copy the file from the application server to the database.
    2) OR be able to upload directly to the database server - wanted to do that originally
    Any help would be appreciated

    Solution for those interested and for anyone else searching this forum for a solution
    I found this on My Oracle Support:
    <h3>Host Command from Forms Not Working in 11g in Sun Solaris Sparc OS [ID 1157346.1]</h3>
    Applies To: Oracle Forms - Version 11.1.1.1.0 and later
    Sun SPARC Sun OS
    Symptoms:
    When trying to execute a Shell script or any OS command using the host() Built-in from Forms 11g, the host()command is not getting executed. The same functionality works on other operating systems and in previous versions like 10gR2.
    Steps to be followed:
    1) Take a backup and edit the $DOMAIN_HOME/config/fmwconfig/servers/WLS_FORMS/applications/formsapp_11.1.1/config/default.env or any custom environment file.
    2) Locate the following environment variable:
    LD_PRELOAD=/ora10gas/app/11.1.0/Middleware/as_1/jdk/jre/lib/sparcv9/libjsig.so
    3) Comment out this variable. After the changes, it will look like the following:
    #LD_PRELOAD=/ora10gas/app/11.1.0/Middleware/as_1/jdk/jre/lib/sparcv9/libjsig.so
    3) a) Instead of LD_PRELOAD, kindly use LD_PRELOAD_64 as given below :
    LD_PRELOAD_64=/ora10gas/app/11.1.0/Middleware/as_1/jdk/jre/lib/sparcv9/libjsig.so
    (This makes HOST AND RUN_REPORT_OBJECT work fine).
    4) Save the file and execute your forms. The Host() built-in will work as expected
    The LD_PRELOAD setting in default.env is only required for the working of signal chaining facility in JVM version 1.5 and later. If you are not using theSignal chaining facility, this variable is not required. For more information, refer to the following documentation
    http://download.oracle.com/docs/cd/E14571_01/doc.1111/e14772/forms.htm#CJAJGAFF

  • Client_Image.READ_IMAGE_FILE problems

    Hi, I have search all over OTN and the web and can't seem to find a solution to my problem. Im using Forms 10gR2, and am trying to display a TIFF image in a form. I am not getting any errors, its just not displaying the image at all.
    I have the images stored in C:\temp\0-GRAPHICS\. I have looked at the webutil.cfg file and updated it with the following:
    #NOTE: By default the file transfer is disabled as a security measure
    transfer.database.enabled=TRUE
    transfer.appsrv.enabled=TRUE
    transfer.appsrv.workAreaRoot=c:\TEMP
    transfer.appsrv.accessControl=TRUE
    #List transfer.appsrv.read.<n> directories
    transfer.appsrv.read.1=c:\temp
    transfer.appsrv.read.2=c:\
    transfer.appsrv.read.3=c:\DevSuite10_1_2
    #List transfer.appsrv.write.<n> directories
    transfer.appsrv.write.1=c:\temp
    transfer.appsrv.write.2=c:\
    transfer.appsrv.write.3=c:\DevSuite10_1_2
    When I run the code, i get no error, it seems to work, just no picture displayed. Here is my code
    When-Button-Pressed trigger:
    DECLARE
    tiff_image_dir VARCHAR2(80) := 'C:\temp\0-GRAPHICS\';
      photo_filename VARCHAR2(80);
    BEGIN /* ** Set the message level high so we can gracefully handle ** an error reading the file if it occurs */
      :CB_PLATE_TIFF.ESL_NUMBER := :UNION_HDRS.ESL_NO;
      :CB_PLATE_TIFF.PLATE_NUM := :EIF_ONE_PPB.EIF_PLATE_NO;
      :System.Message_Level := '25';
      /* ** After fetching an employee record, take the employee's ** Userid and concatenate the '.TIF' extension to derive **
      the filename from which to load the TIFF image. The EMP ** record has a non-database image item named 'EMP_PHOTO' ** into which we read the image. */
      photo_filename := tiff_image_dir||:CB_PLATE_TIFF.ESL_NUMBER||'\'||:CB_PLATE_TIFF.PLATE_NUM||'.tif';
      /* ** For example 'photo_filename' might look like: ** ** /usr/staff/photos/jgetty.tif ** ------ ** ** Now, read in the appropriate image. */
      client_image.READ_IMAGE_FILE(photo_filename, 'TIFF', 'CB_PLATE_TIFF.IMG_PLATE');
      IF NOT FORM_SUCCESS THEN
      MESSAGE('The TIFF file '||:CB_PLATE_TIFF.PLATE_NUM||'.tif does not exist.');
      END IF;
      :SYSTEM.MESSAGE_LEVEL := '0';
      GO_BLOCK('CB_PLATE_TIFF');
    END;
    Am i not initializing the tiff_image_dir properly? Thanks for any help.

    Without actually being able to test your form, my only remaining guess is that the version you are using has a defect.  Since you did not mention exactly which version you are using, I will guess and say that you are using an unpatched version.  Please ensure that you are using Forms 10.1.2.3.  If you are not using this patch version, I recommend you download and install it.  You must have a current MyOracleSupport (and Support) account to do so.  The patch ID number is:  5983622
    Also, since version 10 is no longer entitled to Premiere Support, it might be a good time to consider upgrading to the latest release, 11.1.2.2
    http://www.oracle.com/technetwork/developer-tools/forms/downloads
    Installing WebLogic Server 10.3.6 is a prerequisite to installing Forms/Reports 11.1.2.2, so be sure to download and install it first.  Be sure to review the product documentation before installing any software.
    http://docs.oracle.com/cd/E48391_01/index.htm

  • Problem with output from  report to excel, calling the report from form 10g

    Hi everyone, I'm having a problem generating a excel from a report, which is called from a form, I'm using Forms 10g. The problem is this: My report has a variable number of columns. These columns appear according to data obtained from the database, these columns are dates, In vesion 6 excel file generated shows the columns one after another starting in column A1 to column CP. I mean that the dates are correlative. But in version 10g the excel file generated shows the same report starting in column A to column T, only shows the 20 dates correlative corresponding to this columns, the rest of the dates are down the excel sheet in groups of 20 dates, it's something, the file in 6i grows across and in 10g grows down the excel sheet. The report (rdf file) is the same in 6i and 10g, I compiled the 6i version to obtain the 10g version. The excel sheet generated in 10g looks like the report was in pdf format, because PDF format, cuts the report in pages and the file grows down, if I generate the report in PDF format it has the same structure excel file in 10g has. I hope yo can help because I have days trying to solve this but I have no succes. If someone could help I could email the excel files generated in two versions. Here I put the code I use to generate the files in 6i and 10g. I have tried with DESFORMAT=SPREADSHEET in 10g but the result is the same. Thanks for your help. Greetings for all.
    Code for version 6i (Works Very well)
    PROCEDURE GUARDAREXCEL IS
    pl_id ParamList;
    nom_rep varchar2(20);
    cla_rep varchar2(20);
    cod_dis varchar2(4);
    nom_arch varchar2(100);
    fec date;
    BEGIN
    pl_id := Get_Parameter_List('tmpdata');
    IF NOT Id_Null(pl_id) THEN
    Destroy_Parameter_List( pl_id );
    END IF;
    pl_id := Create_Parameter_List('tmpdata');
    IF :BK_PARAMETROS.LI_COD_DIS IS NOT NULL THEN
    cod_dis := :BK_PARAMETROS.LI_COD_DIS;
    END IF;
    IF :BK_PARAMETROS.TI_COD_CLI IS NOT NULL THEN
    Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,:BK_PARAMETROS.TI_COD_CLI||'%');
    ELSE
    Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,'%');
    :BK_PARAMETROS.TI_COD_CLI:='%';
    END IF;
    IF :BK_PARAMETROS.CLAS_REP=1 THEN
    cla_rep := '001';
    ELSE
         IF :BK_PARAMETROS.CLAS_REP=2 THEN
              cla_rep := '002';
         ELSE
              IF :BK_PARAMETROS.CLAS_REP=3 THEN
              cla_rep := '003';
         ELSE
              cla_rep := '004';
         END IF;
         END IF;
    END IF;
    Add_Parameter(pl_id,'P_COD_DIS',TEXT_PARAMETER, cod_dis);
    Add_Parameter(pl_id,'P_FECHA',TEXT_PARAMETER,to_char(:BK_PARAMETROS.FECFIN, 'DD/MM/YYYY'));
    Add_Parameter(pl_id,'P_CLASE',TEXT_PARAMETER, cla_rep);
    Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
    Add_Parameter(pl_id,'DESTYPE',TEXT_PARAMETER,'File');
    Add_Parameter(pl_id,'MODE',TEXT_PARAMETER,'Character');
    Add_Parameter(pl_id,'DESFORMAT',TEXT_PARAMETER,'DELIMITED' );
    select sysdate into fec from dual;
    IF :BK_PARAMETROS.TIPO_REP=1 THEN
         BEGIN
    nom_rep := 'tdvenrli1577.rep';
    nom_arch := 'c:\windows\temp\RepCobranzaPlanos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
    END;
    ELSIF :BK_PARAMETROS.TIPO_REP=2 THEN
              BEGIN
              nom_rep := 'tdvenrli1578.rep';
              nom_arch := 'c:\windows\temp\RepCobranzaLargos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
              END;
    ELSIF :BK_PARAMETROS.TIPO_REP=3 THEN
         BEGIN
                        Add_Parameter(pl_id,'P_XLS',TEXT_PARAMETER, '1');           
              nom_rep := 'tdvenrli1576.rep';
              nom_arch := 'c:\windows\temp\RepCobranzaDetallados' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';      
              END;
    ELSE
              BEGIN
                        nom_rep := 'TDVENRLI1545.REP';
              nom_arch := 'c:\windows\temp\RepCobranzaTodos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
              END;
    END IF;
    --Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER,nom_arch );
    Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER, nom_arch);
    standard.commit;
    Run_Product(REPORTS, nom_rep, SYNCHRONOUS, runtime, FILESYSTEM, pl_id,'');
    EXCEPTION WHEN Run_Product_Failure THEN
    message('Error');
    END;
    Code for version 10g
    PROCEDURE GUARDAREXCEL IS
    pl_id ParamList;
    nom_rep varchar2(20);
    cla_rep varchar2(20);
    cod_dis varchar2(4);
    nom_arch varchar2(100);
    fec date;
    --byt12122007.sn
    repid REPORT_OBJECT;
         vURL VARCHAR2(500);
         rep_status VARCHAR2(20);
         vJobID VARCHAR2(100);
         v_rep VARCHAR2(100);
    VAR NUMBER;
    w_name_repserv VARCHAR2(30);
    --byt1212007.en
    BEGIN
         --w_name_repserv:=F_OBTIENE_SERVREP;
    w_name_repserv:='repserv';     
    pl_id := Get_Parameter_List('mytmp_params');
    IF NOT Id_Null(pl_id) THEN
    Destroy_Parameter_List( pl_id );
    END IF;
    pl_id := Create_Parameter_List('mytmp_params');
    IF :BK_PARAMETROS.LI_COD_DIS IS NOT NULL THEN
         cod_dis := :BK_PARAMETROS.LI_COD_DIS;
    END IF;
    IF :BK_PARAMETROS.TI_COD_CLI IS NOT NULL THEN
    Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,:BK_PARAMETROS.TI_COD_CLI||'%');
    ELSE
    Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,'%');
    :BK_PARAMETROS.TI_COD_CLI:='%';
    END IF;
    IF :BK_PARAMETROS.CLAS_REP=1 THEN
    cla_rep := '001';
    ELSE
         IF :BK_PARAMETROS.CLAS_REP=2 THEN
              cla_rep := '002';
         ELSE
              IF :BK_PARAMETROS.CLAS_REP=3 THEN
              cla_rep := '003';
         ELSE
              cla_rep := '004';
         END IF;
         END IF;
    END IF;
    Add_Parameter(pl_id,'P_COD_DIS',TEXT_PARAMETER, cod_dis);
    Add_Parameter(pl_id,'P_FECHA',TEXT_PARAMETER,to_char(:BK_PARAMETROS.FECFIN, 'DD/MM/YYYY'));
    Add_Parameter(pl_id,'P_CLASE',TEXT_PARAMETER, cla_rep);
    Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
    /*Add_Parameter(pl_id,'DESTYPE',TEXT_PARAMETER,'File');
    Add_Parameter(pl_id,'MODE',TEXT_PARAMETER,'Character');
    Add_Parameter(pl_id,'DESFORMAT',TEXT_PARAMETER,'DELIMITED' );*/
    select sysdate into fec from dual;
    IF :BK_PARAMETROS.TIPO_REP=1 THEN
    BEGIN
         repid := find_report_object('tdvenrli1577');
    --nom_rep := 'tdvenrli1577.rep';
    nom_arch := 'c:\windows\temp\RepCobranzaPlanos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1577');
    END;
    ELSIF :BK_PARAMETROS.TIPO_REP=2 THEN
    BEGIN
         repid := find_report_object('tdvenrli1578');      
              --nom_rep := 'tdvenrli1578.rep';
              nom_arch := 'c:\windows\temp\RepCobranzaLargos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
              SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1578');
              END;
    ELSIF :BK_PARAMETROS.TIPO_REP=3 THEN
    BEGIN
         repid := find_report_object('tdvenrli1576');
                        Add_Parameter(pl_id,'P_XLS',TEXT_PARAMETER, '1');           
              --nom_rep := 'tdvenrli1576.rep';
              nom_arch := 'c:\windows\temp\RepCobranzaDetallados' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
              SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1576');     
              END;
    ELSE
    BEGIN
         repid := find_report_object('tdvenrli1545');
                        --nom_rep := 'TDVENRLI1545.REP';
              nom_arch := 'c:\windows\temp\RepCobranzaTodos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
              SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1545');     
              END;
    END IF;
    --Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER,nom_arch );
    --Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER, nom_arch);
    standard.commit;
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESNAME,nom_arch);
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_COMM_MODE, SYNCHRONOUS);
         SET_REPORT_OBJECT_PROPERTY(repid, REPORT_EXECUTION_MODE, RUNTIME);
         SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESTYPE, 'File');
         SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESFORMAT, 'DELIMITED');
         SET_REPORT_OBJECT_PROPERTY(repid, REPORT_SERVER, w_name_repserv);
         SET_REPORT_OBJECT_PROPERTY(repid, REPORT_OTHER, 'paramform=no');
         v_rep := RUN_REPORT_OBJECT(repid, pl_id);
         rep_status := REPORT_OBJECT_STATUS(v_rep);
         WHILE rep_status IN ('RUNNING','OPENING_REPORT','ENQUEUED')     LOOP
              rep_status:= report_object_status(v_rep);
         END LOOP;
         IF rep_status = 'FINISHED' THEN
              vJobID := SUBSTR(v_rep, INSTR(v_rep, '_', -1)+1);
              vURL:='/reports/rwservlet/getjobid'||vJobID||'?'||'server='||w_name_repserv;
         END IF;
         WEB.SHOW_DOCUMENT(vURL, '_blank');
         IF NOT form_success THEN
              MESSAGE('Error: PL/SQL held against Button failed to execute');
              RAISE FORM_TRIGGER_FAILURE;
         END IF;
    /*Run_Product(REPORTS, nom_rep, SYNCHRONOUS, runtime, FILESYSTEM, pl_id,'');
    EXCEPTION WHEN Run_Product_Failure THEN
    message('Error');*/
    END;

    There are two problems with your VI.  First, the basic logic of writing/appending to a file (Excel, TDMS, anything) should go something like this:  Open the file, position yourself at the end of the file, then, in the loop, acquire data and write it to the file until you are finished with data acquisition.  When you exit the acquire/write to file loop, then close the file.  In particular, the opening and the closing of the file should not be inside the loop.
    As others have pointed out, writing to Excel might not be optimal, particularly if you are acquiring data at a high rate (and would therefore be writing a lot of data). We actually use Excel in our data acquisition routine, mainly reading from a WorkSheet to get the parameters of a particular stimulus, but also writing the outcome of the response to the stimulus.  As it happens, our "acquisition rate" in this example is on the order of several samples per minute, so there's no problem using Excel (we also sample 16 channels of analog data at 1 KHz -- this gets written as a binary file).
    Second, if you really do want to use Excel, use the (existing) Excel file to which you want to append as the "template" argument of the New Report function.  Then use the Excel Get Last Row function to position yourself at "end of file", as noted above.
    Good Luck.
    Bob Schor

  • How to use PL/SQL & Forms6i for a logon screen

    i am new user to oracle. just wanna now how to create a user logon screen using SQL and Forms6i. well, i have created a table for logon with data item of username and password. in the form, i hava successfully created the data blocks but i don't know how to link them using PL/SQL or triggers or etc.
    ur concern will be very grateful. TQ.

    Hi MatrixMan
    Just create button and write the follwing inside
    trigger when_button_pressed :\
    begin
    logout;
    LOGON(:USER_NAME,:PASSWORD );
    IF FORM_SUCCESS THEN
    MESSAGE('Login Successful');
    MESSAGE('Login Successful');
    ELSE
    MESSAGE('Check username or password');
    MESSAGE('Check username or password');
    GO_ITEM('USER_NAME');
    :USER_NAME:=NULL;
    :PASSWORD:=NULL;
    END IF;
    end;
    Thanks
    Mohammed Al-shake

  • Insert data from a table into 5 different tables

    My application has a data block than display information from another table. From this data block, the user has the option to select the records for upload. The information in the data block is used to insert data into 5 different tables. So if any exception occurs while inserting, the whole process should be rollback, but before this happen a record is inserting in a failed table indicated the reason of the failed.
    For this process I use the following commands:
    1.     sp_name := Get_Application_Property(SAVEPOINT_NAME);
    2.     INSERT DDL
    3.     INSERT DDL
    4.     INSERT DDL
    5.     INSERT DDL
    6.     INSERT DDL
    7.     If Other Exception then ISSUE_ROLLBACK(sp_name) Otherwise FORMS_DDL ('commit')
    The problem the previous insert(s) rollback
    Thanks,

    Hi,
    If you are using FORMS_DDL built-in to insert the data, then after each FORMS_DDL statement, you have to check the values of FORM_SUCCESS or FORM_FAILURE built-ins.
    FORMS_DDL('<insert_statement_1>');
    IF FORM_FAILURE THEN
    <the statement fails. so have to be rollbacked>
    END IF;
    FORMS_DDL('<insert_statement_2>');
    IF FORM_FAILURE THEN
    <the statement fails. so have to be rollbacked>
    END IF;Hope this helps.
    Regards,
    Manu.
    If my response or the response of another was helpful or Correct, please mark it accordingly

  • Any ideas why the second HOST call does not work???

    Hi Folks.
    I have written the following code which works fine in all but one respect.
    The code creates a zip file on a server (Accessed over a network) hence the full windows network path name.
    The call to host on the server works in terms of running the zipinvoices.bat file and the zip file is generated on the server in the correct location.
    The prigram unit also generates the correctly formatted mailinvoices.bat file. However, the second call to HOST does not run/execute the mailinvoices.bat file. If I go to the server and run the mailinvoices.bat file directly, it runs perfectly and emails the file to me, no problemo.
    Why does the second call to HOST from the client machine not run?
    Any clues anyone???
    Cheers
    Simon Gadd
    PROCEDURE send_email_invoices_pu_p (p_organisation IN VARCHAR2) IS
    v_processing_cycle          CHAR(4);     
         v_alert_but                              NUMBER;
         v_error_num                              NUMBER;
         v_sent_status                     NUMBER(1);
    v_stage                                        NUMBER(1);
    v_year                                        VARCHAR2(4);
    v_month                                        VARCHAR2(9);
    v_folder_name                         VARCHAR2(25); -- Name of the file which holds the 'Printed' invoices in the receivables folder. v_organisation                    VARCHAR2(50);
    v_password                              VARCHAR2(25);
    v_organisation                    VARCHAR2(25);
         v_host_command                    VARCHAR2(100);
    v_from_name                              VARCHAR2(100);
    v_to_name                                   VARCHAR2(100);
    v_subject                                   VARCHAR2(100);
    v_error_txt                              VARCHAR2(200);
    v_file                                        VARCHAR2(200);
    v_message                                   VARCHAR2(500);
         v_line_buffer                         VARCHAR2(5000);
    v_working                                   BOOLEAN := TRUE;
    v_zipinvoices_bat               TEXT_IO.FILE_TYPE;
         v_mailinvoices_bat          TEXT_IO.FILE_TYPE;
         CURSOR c_sent_status IS
              SELECT sent
              FROM INVOICE_EMAIL
              WHERE UPPER(ORGANISATION) = UPPER(v_organisation);
         CURSOR c_select_folder IS
              SELECT folder
              FROM INVOICE_EMAIL
              WHERE UPPER(ORGANISATION) = UPPER(v_organisation);     
    CURSOR c_select_email_elements IS
    SELECT      send_to,
                        send_from
    FROM INVOICE_EMAIL
              WHERE UPPER(ORGANISATION) = UPPER(v_organisation);
    BEGIN
    v_organisation := p_organisation;
    -- Check to see if the invoices have already been e-mailed for this Procssing Cycle. If they have,
    -- then warn the user of this and get them to confirm that they wish to proceed and e-mail them again.
    -- The batch e-mail process will re-zip the invoices (ignoring a pre existing .zip file) and overwrite
    -- the existing zip file if it exists or generate it if it does not exist.
         OPEN c_sent_status;
              FETCH c_sent_status INTO v_sent_status;
         CLOSE c_sent_status;     
         IF v_sent_status = 1 THEN
              v_alert_but := SHOW_ALERT('SEND_AGAIN_ALRT');
                   IF v_alert_but = ALERT_BUTTON2 THEN RAISE FORM_TRIGGER_FAILURE;
                        ELSE NULL;
                   END IF;
         END IF;
    :CONTROL.WORKING := 'Started Zipping invoices for '||INITCAP(v_organisation)||'.'||CHR(10)||'Please wait..';
    SYNCHRONIZE;
    -- The following code opens the zipinvoices.bat file which resides in the root folder \\Ebony\c$\FCSS\DB_SCRIPTS\ and modifies it ready to
    -- zip up the invoices in the relevant organisation's invoice folder for the current processing cycle.
    v_processing_cycle := GET_CURRENT_TRAFFIC_PERIOD;
    v_month := RTRIM(INITCAP(TO_CHAR(TO_DATE(v_processing_cycle, 'MMYY'), 'MONTH')));
    v_year := (TO_CHAR(TO_DATE(v_processing_cycle, 'MMYY'), 'YYYY'));
         OPEN c_select_folder;
         FETCH c_select_folder INTO v_folder_name;
         CLOSE c_select_folder;
    KILL_OLD_ZIP_PU_P('del \\Ebony\c$\FCSS\CYCLE_DATA\'||v_processing_cycle||'\receivables\'||v_folder_name||'\invoices.zip');
    SELECT zip_password
    INTO v_password
    FROM INVOICE_EMAIL
    WHERE UPPER(ORGANISATION) = UPPER(v_organisation);
    v_zipinvoices_bat := TEXT_IO.FOPEN('\\Ebony\c$\FCSS\DB_SCRIPTS\zipinvoices.bat', 'w');
    v_line_buffer := 'cd..';
    TEXT_IO.PUT_LINE (v_zipinvoices_bat, v_line_buffer);
    v_line_buffer := 'cd..';
    TEXT_IO.PUT_LINE (v_zipinvoices_bat, v_line_buffer);
    v_line_buffer := 'wzzip -s'||v_password||' -x*.zip -ybc \\Ebony\c$\FCSS\CYCLE_DATA\'||v_processing_cycle||'\receivables\'||v_folder_name||'\invoices \\Ebony\c$\FCSS\CYCLE_DATA\'||v_processing_cycle||'\receivables\'||v_folder_name||'\*.*';
    TEXT_IO.PUT_LINE (v_zipinvoices_bat, v_line_buffer);
    v_line_buffer := 'exit';
    TEXT_IO.PUT_LINE (v_zipinvoices_bat, v_line_buffer);
    TEXT_IO.FCLOSE (v_zipinvoices_bat);
    -- The following code executes the freshly edited \\Ebony\c$\FCSS\DB_SCRIPTS\zipinvoices.bat file to produce the zipped invoices file
    -- ready to be e-mailed out to the address specified in the INVOICE_EMAIL table for the relevant organisation.
    v_host_command := '\\Ebony\c$\FCSS\DB_SCRIPTS\zipinvoices.bat';
    v_stage := 1;
    HOST (v_host_command, NO_SCREEN);
    IF NOT Form_Success THEN
         IF v_stage = 1 THEN
         :CONTROL.WORKING := 'Error -- The .zip file for '||INITCAP(v_organisation)||' was not produced.';
              SYNCHRONIZE;     
         ELSIF v_STAGE = 2 THEN
         :CONTROL.WORKING := 'Error -- The zipped invoices file for '||INITCAP(v_organisation)||' was not emailed.';
              SYNCHRONIZE;               
              END IF;     
    ELSE NULL;
    END IF;
    :CONTROL.WORKING := 'All invoices for '||INITCAP(v_organisation)||' successfully zipped.'||CHR(10)||'Attempting to send via e-mail.'||CHR(10)||'Please wait..';
    SYNCHRONIZE;
    -- The following code e-mails the freshly created .zip file for the relevant organisation and e-mails it to the
    -- recipient specified in the relevant row in the INVOICE_EMAIL programme along with from address, subject and
    -- message if specified.
    OPEN c_select_email_elements;
    FETCH c_select_email_elements INTO
    v_to_name,
    v_from_name;
    CLOSE c_select_email_elements;
    v_stage := 2;
    v_mailinvoices_bat := TEXT_IO.FOPEN('\\Ebony\c$\FCSS\DB_SCRIPTS\mailinvoices.bat', 'w');
    v_line_buffer := 'cd..';
    TEXT_IO.PUT_LINE (v_mailinvoices_bat, v_line_buffer);
    v_line_buffer := 'cd..';
    TEXT_IO.PUT_LINE (v_mailinvoices_bat, v_line_buffer);
    v_line_buffer := 'clemail -quiet -smtpserver mailhost.0800dial.com -smtpport 25 -to '||v_to_name||' -from '||v_from_name||' -subject "'||v_month||' '||v_year||' Roaming Traffic Invoices from United Clearing Ltd" -bodyfile \\Ebony\c$\FCSS\DB_SCRIPTS\invoice_body.txt -attach \\Ebony\c$\FCSS\CYCLE_DATA\'||v_processing_cycle||'\receivables\'||v_folder_name||'\invoices.zip';
    TEXT_IO.PUT_LINE (v_mailinvoices_bat, v_line_buffer);
    v_line_buffer := 'exit';
    TEXT_IO.PUT_LINE (v_mailinvoices_bat, v_line_buffer);
    TEXT_IO.FCLOSE (v_mailinvoices_bat);
    v_host_command := '\\Ebony\c$\FCSS\DB_SCRIPTS\mailinvoices.bat';
    HOST (v_host_command, NO_SCREEN);
    IF NOT Form_Success THEN
         IF v_stage = 1 THEN
         :CONTROL.WORKING := 'Error -- The .zip file for '||INITCAP(v_organisation)||' was not produced.';
              SYNCHRONIZE;     
         ELSIF v_STAGE = 2 THEN
         :CONTROL.WORKING := 'Error -- The zipped invoices file for '||INITCAP(v_organisation)||' was not emailed.';
              SYNCHRONIZE;               
              END IF;     
    ELSE NULL;
    END IF;
    UPDATE INVOICE_EMAIL
         SET sent = 1
              WHERE UPPER(ORGANISATION) = UPPER(v_organisation);
    COMMIT;
    GO_BLOCK ('INVOICE_EMAIL');
    EXECUTE_QUERY;               
    :CONTROL.WORKING := 'Please press a button on the left to e-mail invoices to the organisations listed.';
    SYNCHRONIZE;
    EXCEPTION
         WHEN OTHERS THEN
              v_error_num := SQLCODE;
              v_error_txt := SUBSTR(SQLERRM, 1, 200);
              MESSAGE('The error was: '||v_error_txt||' and the code was: '||v_error_num);
              RAISE FORM_TRIGGER_FAILURE;
    END;

    As a suggestion I'd put the Text_io segments into their own begin - exception - end sub-blocks within the main code. This way if Text_io does raise an exception you can catch it earlier as it may be able to recover - That is if it is a text_io exception.
    Other than that you;ll have to step through in Debug.

  • Bug with SET_LOV_COLUMN_PROPERTY Built-In (or FORMS_SUCCESS). FRM-41364.

    Hi everyone,
    I have an in-house pll library which supports the translation of custom forms into multiple languages.
    By and large, this code works perfectly fine.
    One of the tasks of the code is to analyse a given custom-form, and create a list in a custom-table of all of the items, buttons, LOVs, windows etc in the form - i.e. all of the items that can-be/need-to-be translated, such that the user can then update/maintain the translations.
    When it comes to the LOV columns, there is no direct way (as far as I am aware) to tell how many columns are in an LOV. Additionally, there is no GET_LOV_COLUMN_PROPERTY. So, what the PLL does is LOOP from 1 .. 10 (making the assumption that no LOV will have more than 10 columns) and each time around the loop it calls the SET_LOV_COLUMN_PROPERTY(curr_lov_name, loop_index, TITLE, '');, which effectively does nothing, but then the code immediately makes a call to FORM_SUCCESS.
    If TRUE, then we know the SET_LOV_COLUMN_PROPERTY worked, which means there must have been a column numbered <loop_index> so we can insert a record into the translations table for that one, if FORM_SUCCESS is FALSE, then do nothing (other than loop around a few more times until we get to 10, then fall out of the loop). It's not ideal, but it works ... except - for one particular form, the code raises FRM-41364.
    Initially, out of habit, I enclosed the code in an anonymous block, but then I remembered that Built-In's don't actually raise exceptions when they fail.
    So I sprinkled in a load of debug messages (via AUTONOMOUS COMMIT) and indeed the call to SET_LOV_COLUMN_PROPERTY is the last call before the FRM-41264 error pops up on screen. Can anyone understand why this error show up on one form and not all the others? The LOVs seem identical (in terms of properties, etc, obviously the actual SELECTs are different). I even created a new LOV in the bad form, in case it was something corrupt, but I got the same problem.
    The FRM-41364 error is a level-99 error, so the setting of the :system.message_level shouldn't have any effect (you can only set from 0 - 25).
    There is one other possible clue to the mystery - when I first put in the debug messages, I put one in between the SET_LOV_COLUMN_PROPERTY call and the check of FORM_SUCCESS, which I subsequently removed because Oracle recommends against this (i.e. You should always call FORM_SUCCESS immediately after the Built-In you want to test). However, I did notice in the error log that not only did the "before" debug message appear, but also the "after" debug message. So it was as if the FORM_SUCCESS call was actually the one that raised the FRM-41364, which was most peculiar to me.
    I am using Forms Builder 10.12.0.2 on Windows XP, and I am compiling on an R12.1.3 EBS instance running on an 11.2.0.2.0 database.
    Here is the code, note - the exception section never gets called:
    FOR loop_index IN 1..10 LOOP
      debug ( 'Before Anonymous block');
      BEGIN
        debug ( 'Before set_lov_column_property');
        set_lov_column_property (curr_lov_name, loop_index, TITLE, '');
        IF FORM_SUCCESS THEN
          debug ( 'Add LOV column for translation');
          my_package.my_insert_translation_proc();
        ELSE
          debug ( 'FORMS_SUCCESS - FALSE');
        END IF;
        debug ( 'After FORM_SUCCESS test');
      EXCEPTION
        WHEN OTHERS THEN
          debug ( 'EXCEPTION');
      END;
      debug ( 'After block');
    END LOOP;
    debug ( 'After LOOP');Thanks in advance for any help or suggestions anyone can offer,
    Alan.
    Edited by: 958388 on 11-Sep-2012 07:59 (Typo in title)

    Hi Oleh,
    I was just returning to the thread to report that I'd found the issue (actually a colleague did) - and it is exactly what you said - the in-house documentation for the translations library says to add an ON-ERROR trigger to capture (and ignore) 41364, but whoever developed this form apparently forgot to perform this step.
    You still get the brownie points for the answer though =)
    Thanks for the help, my mind is more restful now because I was going nuts trying to find this!
    Alan.

  • Error in populating table data through forms

    I had one SIM REPLACEMENT Form which has a base block table PPBS_SIM_CHANGE.
    Once all the entires are entered the table gets populated.
    But some times it seen that the base table does not get populated.Also the form does not gives any error.Pl help me to find out the error.
    In the Save button the following code is written
    IF :SYSTEM.FORM_STATUS IN ('NEW','CHANGED') THEN
    commit;
    if not form_success then
    message ('Transaction Failed...');
    else
    message('Transaction Successfully Completed..');
    end if;
    END IF;

    Why do you create a Save button in the first place? Forms already has its own Save botton.

  • READ_IMAGE_FILE in Oracle Forms6.0, Code added

    Hi,
    I have two tif files one is compressed in Lempel-Ziv and another is not. Now READ_IMAGE_FILE does not read the image compresses in Lempel-Ziv file but does read the other tiff files. Also the size of the tiff file with Lempel-Ziv compression greater than 1084KB while the others are 60 to 65 KB.
    The operating system being used is Windows2000.
    When Button Pressed has the following code
    DECLARE
    a NUMBER;
    b VARCHAR2(2000);
    filename VARCHAR2(256);
    v_dirname varchar2(255);
    v_filename varchar2(255);
    BEGIN
         GO_BLOCK('CONTROL');
         GO_BLOCK('SCANNED_IMAGES');
    a := Imaging_DImgScan.OpenScanner(:item('CONTROL.ocx').interface);
    a := Imaging_DImgScan.ResetScanner(:item('CONTROL.ocx').interface);
    a := Imaging_DImgScan.StartScan(:item('CONTROL.ocx').interface);
    b := Imaging_DImgScan.DestimageControl(:item('CONTROL.ocx').interface);
    Imaging_DImgScan.DestimageControl(:item('CONTROL.ocx').interface,b);
    a := Imaging_DImgScan.CloseScanner(:item('CONTROL.ocx').interface);
    GO_BLOCK('SCANNED_IMAGES');
    :SYSTEM.MESSAGE_LEVEL := 25;
    --filename := GET_FILE_NAME(FILE_FILTER='TIFF');
    v_dirname := 'C:\';
    v_filename := get_file_name(v_dirname,NULL,'tiff files(*.tif)|*.tif|');
    IF v_filename is not null THEN
    read_image_file(v_filename,'ANY', 'SCANNED_IMAGES.IMAGE_DATA');
    end if;
    :global.pagecount := '1';
    IF NOT FORM_SUCCESS THEN
    --a := Imaging_DImgScan.CloseScanner(:item('CONTROL.ocx').interface);
    message(' There was a scanning error. ');
    message(' There was a scanning error. ');
    :SYSTEM.MESSAGE_LEVEL := 0;
    RETURN;
    END IF;
    :SYSTEM.MESSAGE_LEVEL := 0;
    IF :SCANNED_DOCUMENTS.zoom_amount IS NOT NULL THEN
    Image_Zoom('SCANNED_IMAGES.image_data', ZOOM_PERCENT, :scanned_documents.zoom_amount);
    END IF;
    :scanned_images.page_count := to_number(:GLOBAL.PAGECOUNT);
    :scanned_images.description := 1;
    :scanned_images.page_number := 1;
    EXCEPTION
         WHEN OTHERS THEN
    a := Imaging_DImgScan.CloseScanner(:item('CONTROL.ocx').interface);
    message(' Scanner Not Available ');
    message(' Scanner Not Available ');
    END;
    Can anybody help?
    Thanks

    Sorry, I have no clue as to that might cause this.
    but maybe this will help others understanding your code:
    declare
       a                                            number;
       b                                            varchar2( 2000 );
       filename                                     varchar2( 256 );
       v_dirname                                    varchar2( 255 );
       v_filename                                   varchar2( 255 );
    begin
       go_block( 'CONTROL' );
       go_block( 'SCANNED_IMAGES' );
       a := Imaging_DImgScan.OpenScanner(:item('CONTROL.ocx').interface);
       a := Imaging_DImgScan.ResetScanner(:item('CONTROL.ocx').interface);
       a := Imaging_DImgScan.StartScan(:item('CONTROL.ocx').interface);
       b := Imaging_DImgScan.DestimageControl(:item('CONTROL.ocx').interface);
       Imaging_DImgScan.DestimageControl(:item('CONTROL.ocx').interface,b);
       a := Imaging_DImgScan.CloseScanner(:item('CONTROL.ocx').interface);
       GO_BLOCK('SCANNED_IMAGES');
       :SYSTEM.MESSAGE_LEVEL := 25;
       --filename := GET_FILE_NAME(FILE_FILTER='TIFF');
       v_dirname := 'C:\';
       v_filename := get_file_name(
                       v_dirname
                     , null
                     , 'tiff files(*.tif)|*.tif|' );
       if v_filename is not null
       then
          read_image_file(
             v_filename
           , 'ANY'
           , 'SCANNED_IMAGES.IMAGE_DATA' );
       end if;
       :global.pagecount := '1';
       if not form_success
       then
          --a := Imaging_DImgScan.CloseScanner(:item('CONTROL.ocx').interface);
          message( ' There was a scanning error. ' );
          message( ' There was a scanning error. ' );
          :system.message_level := 0;
          return;
       end if;
       :system.message_level := 0;
       if :scanned_documents.zoom_amount is not null
       then
          image_zoom(
             'SCANNED_IMAGES.image_data'
           , zoom_percent
           , :scanned_documents.zoom_amount );
       end if;
       :scanned_images.page_count := to_number( :global.pagecount );
       :scanned_images.description := 1;
       :scanned_images.page_number := 1;
    exception
       when others
       then
          a := Imaging_DImgScan.CloseScanner(:item('CONTROL.ocx').interface);
          message( ' Scanner Not Available ' );
          message( ' Scanner Not Available ' );
    end;good luck!
    Message was edited by:
    Remco Goris

Maybe you are looking for

  • Help needed in Geography datatype

    Hi, using sqlserver 2008 R2 db below is my  ZipCodes table schema Create table ZipCodes(ID bigint primary key identity(1,1),ZipCode varchar(10), Address varchar(4000), city varchar(50),state varchar(50),Latitude float,Longitude float) trying to add n

  • Creating Browse CD Button in DW CS3

    Greetings, Programs! (A little Tron humor...) I have a CD that I am authoring and distributing to my clients. On insertion, the CD opens an HTA with an iframe for the main interface, which is an html file. At the top of this file is my navigation bar

  • Where to get AS2 MDN xsd or dtd?

    Hi guys! I need to configure MDN receiving and as I go through Seeburger documentation, in the last chapter there is a scenario description, however, I don't know where to get xsd or dtd for creating interface for MDN messages. Any ideas? Thanx a lot

  • Multiline label

    The labels for my formItems are sometimes too long for one line, and pointing to the label to see a tooltip display the full title is insufficient for my client's requirements. There is room on the stage for the label to wrap over two lines, but acco

  • Since I've up-dated iPad 2 with IOS7, the typing is very slow. What should I do ?

    Since I've up-dated iPad 2 with IOS7, the typing is very slow. What should I do ?