Home » Developer & Programmer » Forms » 302000 non oracle exception when trying to open a windows browser from a unix generated form (oracle forms 6i, solaris 10)
302000 non oracle exception when trying to open a windows browser from a unix generated form [message #417206] Thu, 06 August 2009 09:18 Go to next message
paulr
Messages: 3
Registered: August 2009
Location: edinburgh scotland
Junior Member
Hi,
I have created a form to allow upload and validation of a csv file. The form has been generated successfully on our unix server. When i run the form and try to select a file to upload i get the 302000 non oracle exception error.
the code i used is a follows, can anyone suggest a solution.
thanks
PROCEDURE getfilename
IS
   v_file_chosen   VARCHAR2 (1000);
BEGIN
   v_file_chosen :=
             GET_FILE_NAME ('c:\', file_filter => 'CSV Files (*.csv)|*.csv|');

   IF NVL (LENGTH (v_file_chosen), 0) > 0
   THEN
      :file_disp.filename_path := v_file_chosen;
   END IF;
END;

--------------------------------------------

FUNCTION get_file
   RETURN BOOLEAN
IS
   val_file       VARCHAR2 (1000);
   cat_file       text_io.file_type;
   text_line      VARCHAR2 (70);
   p_nacode       VARCHAR2 (10);
   p_nccategory   VARCHAR2 (12);
   v_numrecs      NUMBER;
BEGIN
   getfilename;
   SET_WINDOW_PROPERTY (forms_mdi_window, window_state, MINIMIZE);
   val_file := :file_disp.filename_path;

   IF val_file = ''
   THEN
      RETURN FALSE;
   END IF;

   cat_file := text_io.fopen (val_file, 'R');                 --c:\student.csv
   v_numrecs := 0;

   LOOP
      text_io.get_line (cat_file, text_line);
      COPY (SUBSTR (text_line, 1, INSTR (text_line, ',', 1, 1) - 1),
            'file_disp.na_code'
           );
      COPY (SUBSTR (text_line,
                    INSTR (text_line, ',', 1, 1) + 1,
                    LENGTH (text_line) - 1
                   ),
            'file_disp.nc_category'
           );
      p_nacode := :file_disp.na_code;
      p_nccategory := :file_disp.nc_category;
      v_numrecs := v_numrecs + 1;
      valid_rec (p_nacode, p_nccategory);
   END LOOP;

   :control.recs_in_file := v_numrecs;
   RETURN NULL;
EXCEPTION
   WHEN NO_DATA_FOUND
   THEN
      IF SQLCODE = -1403
      THEN
         MESSAGE (TO_CHAR (SQLCODE) || ': ' || SQLERRM);
         MESSAGE ('load failed no matching data in unit get_file');
      END IF;

      text_io.fclose (cat_file);
      RETURN TRUE;
   WHEN OTHERS
   THEN
      MESSAGE ('load failed 2 ' || TO_CHAR (SQLCODE) || ' : ' || SQLERRM);

      IF SQLCODE = -302000
      THEN
         LOOP
            EXIT WHEN tool_err.nerrors = 0;
            MESSAGE (TO_CHAR (tool_err.code) || ': ' || tool_err.MESSAGE);
            tool_err.pop;
         END LOOP;
      END IF;

      RETURN FALSE;
END;                                                           
/* get_file */

[EDITED by LF: formatted the code and applied [code] tags]

[Updated on: Thu, 06 August 2009 12:43] by Moderator

Report message to a moderator

Re: 302000 non oracle exception when trying to open a windows browser from a unix generated form [message #417248 is a reply to message #417206] Thu, 06 August 2009 13:21 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
I just googled the error code.

By
Vamsi
Re: 302000 non oracle exception when trying to open a windows browser from a unix generated form [message #417273 is a reply to message #417206] Thu, 06 August 2009 19:52 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Add 'message;pause;' pairs and tell us on which line your code has failed. Is this your first form? Is this a new installation of Oracle Forms?

David
Re: 302000 non oracle exception when trying to open a windows browser from a unix generated form [message #417304 is a reply to message #417273] Fri, 07 August 2009 02:01 Go to previous messageGo to next message
paulr
Messages: 3
Registered: August 2009
Location: edinburgh scotland
Junior Member
This is not a new installation, I have done this before with windows generated forms.
This is the first time i have tried to do this with a unix generated form.
Re: 302000 non oracle exception when trying to open a windows browser from a unix generated form [message #417486 is a reply to message #417304] Sun, 09 August 2009 19:51 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I repeat: "Add 'message;pause;' pairs and tell us on which line your code has failed."

David
Re: 302000 non oracle exception when trying to open a windows browser from a unix generated form [message #417546 is a reply to message #417486] Mon, 10 August 2009 03:07 Go to previous messageGo to next message
paulr
Messages: 3
Registered: August 2009
Location: edinburgh scotland
Junior Member
it's failing on
PROCEDURE GET_FILE_NAME

v_file_chosen := GET_FILE_NAME ('c:\', file_filter => 'CSV Files (*.csv)|*.csv|');
Re: 302000 non oracle exception when trying to open a windows browser from a unix generated form [message #417664 is a reply to message #417546] Mon, 10 August 2009 20:21 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Okay, it looks like you will have to move to d2kwutil and use the 'win_api_dialog.open_file' command.

I think you will have to copy the 'd2kwut60.dll' and 'd2kwutil.pll' files to the directory on your Unix box that contains your forms and menus. More information can be obtained from the 'D2KWUTIL.html' file which is part of the 'd2kwutil' zip which you can download from Oracle's Forms website.

David
Previous Topic: Using Forms with XE
Next Topic: Migrating from 32bit to 64 bit
Goto Forum:
  


Current Time: Fri Dec 02 20:45:07 CST 2016

Total time taken to generate the page: 0.05720 seconds