2 Replies Latest reply: Jun 25, 2012 11:17 AM by 858259 RSS

    Not able to create a text file in Client Machine using Forms 10g

    User10308145-Oracle
      Hi - I'm mot able to create a text file in Client Machine using Forms 10g. I'm getting error when system executes the bolded line.(i.e. CLIENT_TEXT_IO.FOPEN). During run-time system is throwing "ORA-06508: PL/SQL: could not find program unit being called".

      I had attached webutil.pll in the form.

      Please advise me.

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

      DECLARE

      l_Temp CLIENT_TEXT_IO.FILE_TYPE;
      LC$Name Varchar2(100) ;
      LC$Fic Varchar2(100) ;
      LN$Lines Pls_integer := 0 ;
      LC$Line Varchar2(4000) ;
      Cursor C_CUR Is
      Select * From TEST_TEXTIO where rownum <= 50;

      BEGIN
      LC$Name := 'tmp_file.txt' ;
      LC$Fic := 'c:\temp\tmp_file.txt';
      Begin
      l_temp := CLIENT_TEXT_IO.FOPEN( 'C:\temp\tmp_file.txt', 'W');
      Exception
           when others then
           message( 'OPEN FILE ERROR ' || LC$Fic ||sqlerrm );
           display_error;
           raise form_trigger_failure;
      End ;
      -- Write the lines --
      For Cur In C_CUR Loop
           LC$Line := Cur.CODE || ' -> ' || Cur.COL1 || ',' || Cur.COL2 || ',' || Cur.Col3 ;
           CLIENT_TEXT_IO.PUT_LINE( LF$File, LC$Line ) ;      
           LN$Lines := C_CUR%ROWCOUNT ;
      End loop ;
      -- Close the file --
      CLIENT_TEXT_IO.FCLOSE( LF$File ) ;
      Exception
           When others Then
      message('err='||sqlerrm);message(' ');
      display_error;
      CLIENT_TEXT_IO.FCLOSE( LF$File ) ;      
           Raise ;
      END;

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

      Thanks.

      Arun
        • 1. Re: Not able to create a text file in Client Machine using Forms 10g
          Prabodh
          Hi,
          >
          Hi - I'm mot able to create a text file in Client Machine using Forms 10g. I'm getting error when system executes the bolded line.(i.e. CLIENT_TEXT_IO.FOPEN). During run-time system is throwing "ORA-06508: PL/SQL: could not find program unit being called".

          I had attached webutil.pll in the form.
          >

          Just attaching the PLL is not enough. See {thread:id=1073270}

          Regards,
          • 2. Re: Not able to create a text file in Client Machine using Forms 10g
            858259
            Hi ,

            i have one Question though its not related to thos question if some could help me it will be really helpful,

            i have created one program to import and export excel to forms vice versa, if the form is attached with webutil its working fine am using ole2.but i have a new idea if i add this program in menu, it can be used for all the forms attched to that menu, i made program also, but problem am facing right now is if the form is not attched with webutil it will not work so is there possiblity to share my webutil from one form to another form ,so i will keep one form as a interface form in that webutil will be attched ,i can share that webutil to all other forms so that all the forms no need to attach webutil again

            if its possible means please suggest some ideas