troubleshooting Question

FRM-1403: ORA-01403 No Data Found when calling TEXT I/O procedure

Avatar of TComandante
TComandante asked on
Oracle Database
8 Comments1 Solution4373 ViewsLast Modified:
Hello Forms6i experts,
        I've been trying to resolve this problem for 2 days now. Our oracle database is version 9.206.  I checked the filenames, the sql in my cursor and it
        returns data. But when I call this from forms6i, I'm getting a no data found. I don't understand it.  There's another option of creating an XML file. I can
        call & create the XML file from a stored procedure, but I don't know how to do it. Can someone give me the logic?

       Below is my TEXT I/O procedure:

PROCEDURE XML_FILE_UPDATE

IS


    l_in_file                  TEXT_IO.FILE_TYPE;
    l_id                  NUMBER                  := name_in('ORGANIZATIONS.ORG_ID');
    l_cmp_id            NUMBER                  := name_in('ORGANIZATIONS.ORG_ID');
    l_event                  VARCHAR2(1)        := 'I';
    l_filename            VARCHAR2(200)    := l_id||'_'||l_cmp_id||'.xml';
    l_the_file                 VARCHAR2(1000)  := 'C:\TEMP\PW_XML\'||l_filename;
    l_output_line              VARCHAR2(2000);
   
    CURSOR c_company IS
      SELECT '<DBEvent'||CHR(10)||'      '
             ||'<Master>'||'C'||'</Master>'||CHR(10)||'      '
             ||'<ID>'||to_char(l_id)||'</ID>'||CHR(10)||'      '
             ||'<CompID>'||to_char(l_cmp_id)||'</CompID>'||CHR(10)||'      '
             ||'Event<>'||'U'||'</Event>'||CHR(10)
             ||'</DBEvent>'
      FROM organizations
     WHERE org_id = l_id;
 
  BEGIN

    /* Initialize and open the file for writing */
    l_in_file := text_io.fopen(l_the_file, 'w');
   
     /* Get all the records and write to file */
     OPEN c_company;
    FETCH c_company
     INTO l_output_line;

   
     text_io.put_line(l_in_file,l_output_line);
   
    /* Close the cursor */
     CLOSE c_company;
       
    /* Close the file */
    text_io.fclose (l_in_file);

  END;


Thanks,
Terry

 
ASKER CERTIFIED SOLUTION
DarthMod

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros