• Post Reply Bookmark Topic Watch Topic
  • New Topic

able to create a file but can't write??  RSS feed

 
aliya sharma
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
THis is a follow up from my previous post. I'm able to create a file but can't write to it. This is my code:

After i run this code, no exceptions are thrown and on my console its shows "output written". but when i open froogle.txt on C drive . there isn't anything in there. COuld someone please point me to the right path. I would realy appreciate it. I've been stuck on this for long time now. THanks.
Aliya
 
aliya sharma
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the last catch should be:
 
aliya sharma
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I managed to figured it out. Don't kow what i did differently though, but its working now. Code is same as mentioned before. I just ran it and its writing to the file. Now, on to, gettign information from database and writing to a file. I'll be back with more questions .

Aliya
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try flushing the output stream before you end the program.

Moving this to the I/O and Streams forum...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!