302000 non oracle exception when trying to open a windows browser from a unix generated form [message #417206] |
Thu, 06 August 2009 09:18 |
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 #417664 is a reply to message #417546] |
Mon, 10 August 2009 20:21 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS 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
|
|
|