Home » Developer & Programmer » Forms » problem with webutil_db package in forms 10g (oracle forms10g, 10.1.2.0.2,xp)
problem with webutil_db package in forms 10g [message #408623] Wed, 17 June 2009 01:51 Go to next message
sonrub_iqb
Messages: 11
Registered: August 2005
Location: mumbai
Junior Member



Dear All,

In fact i want to attach files in forms 10g. i have used webutil library as wellas i created webutil_db package and granted execute permission on that.but i am facing problem.when i am running form after open dialogbox i select file then it's error is coming like -: ORA-00921 unexpected end of sql statement.
ORA-06512 at "dba_hdesksys.webutil_db", line 50.

please help me anyone.i am trying to solve this problem from 2 days.

thanks.
Re: problem with webutil_db package in forms 10g [message #408647 is a reply to message #408623] Wed, 17 June 2009 03:53 Go to previous messageGo to next message
tlananthu
Messages: 18
Registered: April 2007
Location: India
Junior Member

Hi,

Could you post your code if possible?
Re: problem with webutil_db package in forms 10g [message #408700 is a reply to message #408647] Wed, 17 June 2009 06:17 Go to previous messageGo to next message
sonrub_iqb
Messages: 11
Registered: August 2005
Location: mumbai
Junior Member

Thanks,
i am sending .fmb files too.
see i have written procedure to add files as -:

PROCEDURE PROC_UPLOAD_ATTACHMENT IS
 TRANSFER_OK BOOLEAN;
 CLIENT_DIR_FILE VARCHAR2(300);
 FILE_NAME VARCHAR2(100);
BEGIN
insert into attachments(ATTACH_SRNO,ATTACH_CODE)values(1,:project_mstr.project_id);
	CLIENT_DIR_FILE:=CLIENT_GET_FILE_NAME;
	FILE_NAME:=CLIENT_DIR_FILE;
	TRANSFER_OK:=WEBUTIL_FILE_TRANSFER.CLIENT_TO_DB_WITH_PROGRESS(CLIENTFILE=>FILE_NAME,
       TABLENAME=>'ATTACHMENTS',COLUMNNAME=>'FILEVAL',WHERECLAUSE=>NULL,
	             PROGRESSTITLE=>'UPLOAD TO DATABASE IN PROGRESS',PROGRESSSUBTITLE=>'PLEASE WAIT',ASYNCHRONOUS=>FALSE,
	             CALLBACKTRIGGER=>NULL);
 FORMS_DDL('COMMIT');	             
EXCEPTION WHEN OTHERS THEN 
	MESSAGE(SQLCODE);
	MESSAGE(SQLERRM);
END;

[EDITED by DJM: applied [code] tags]

[Updated on: Tue, 23 June 2009 01:33] by Moderator

Report message to a moderator

Re: problem with webutil_db package in forms 10g [message #409506 is a reply to message #408700] Mon, 22 June 2009 23:33 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Please use 'code' tags when posting code.

Use 'message;pause;' pairs to determine exactly which line is failing and then get back to us.

Use 'standard.commit' NOT a 'forms_ddl' command.

David
Re: problem with webutil_db package in forms 10g [message #409512 is a reply to message #409506] Tue, 23 June 2009 00:03 Go to previous messageGo to next message
sonrub_iqb
Messages: 11
Registered: August 2005
Location: mumbai
Junior Member


Thanks Mr.David,

i Solved the problem.
Re: problem with webutil_db package in forms 10g [message #409542 is a reply to message #409512] Tue, 23 June 2009 01:32 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
And the solution was??

David
Re: problem with webutil_db package in forms 10g [message #409585 is a reply to message #409542] Tue, 23 June 2009 03:46 Go to previous message
sonrub_iqb
Messages: 11
Registered: August 2005
Location: mumbai
Junior Member

i entered the condition in where clause and changed the column as unique which is used in the condition.the code looks like -:

PROCEDURE PROC_UPLOAD_ATTACHMENT IS
 TRANSFER_OK BOOLEAN;
 CLIENT_DIR_FILE VARCHAR2(300);
 FILE_NAME VARCHAR2(100);
BEGIN
	CLIENT_DIR_FILE:=CLIENT_GET_FILE_NAME;
	FILE_NAME:=CLIENT_DIR_FILE;
	:blk_attachments.filename:=to_char(file_name);
insert into attachments(ATTACH_SRNO,ATTACH_CODE,fname)values(:parameter.srno,:PROJECT_MSTR.PROJECT_ID,:blk_attachments.filename);
	--update_logfile('iqbal.txt','w','message');		
	TRANSFER_OK:=WEBUTIL_FILE_TRANSFER.CLIENT_TO_DB_WITH_PROGRESS(CLIENTFILE=>FILE_NAME,
	             TABLENAME=>'ATTACHMENTS',COLUMNNAME=>'FILEVAL',WHERECLAUSE=>'attach_srno='||to_char(:parameter.srno),
	             PROGRESSTITLE=>'UPLOAD TO DATABASE IN PROGRESS',
	             PROGRESSSUBTITLE=>'PLEASE WAIT',
	             ASYNCHRONOUS=>FALSE,
	             CALLBACKTRIGGER=>NULL);
 FORMS_DDL('COMMIT');	             
EXCEPTION WHEN OTHERS THEN 
	MESSAGE(SQLCODE);
	MESSAGE(SQLERRM);
END;

[EDITED by DJM: applied [code] tags]

[Updated on: Tue, 23 June 2009 19:54] by Moderator

Report message to a moderator

Previous Topic: Attaching menu to a form
Next Topic: Forms to call php file to output csv result
Goto Forum:
  


Current Time: Sun Dec 04 12:53:44 CST 2016

Total time taken to generate the page: 0.09155 seconds