Hi all,
My requirement is like this:
I have list of numbers, i need to get the data related to those numbers from database and write the information into a file .
I am using open function to write data related to one number. Close the file. Get the next number ,write data and close again.
I am using this logic as my file depends on some information that is being extracted for number. So every time, i prepare the file name (with that information: say xxx) and open the file in append mode. So if the extracted information (xxx) is already existing, this data will be appended to the existing file. Otherwise a new file will be created.
As per my understanding, as i am closing this file everytime, ideally speaking i will have only one open file at any time. But i am getting "Too many open files" errors.
Could some one please help me in resolving this issue.
Thanks in advance
Parvat