Welcome to Dream.In.Code
Getting C# Help is Easy!

Join 136,083 C# Programmers for FREE! Get instant access to thousands of C# experts, tutorials, code snippets, and more! There are 1,533 people online right now. Registration is fast and FREE... Join Now!




cannot read an already opened .csv file using stream reader object

 
Reply to this topicStart new topic

cannot read an already opened .csv file using stream reader object, cannot read an already opened .csv file using stream reader object

Rajasree
11 Apr, 2008 - 04:23 AM
Post #1

New D.I.C Head
*

Joined: 27 Feb, 2008
Posts: 10

hi,

Not able to read an already opened .csv file using stream reader object.
Any other way to read an open .csv file through code .?

please help ..



User is offlineProfile CardPM
+Quote Post

zakary
RE: Cannot Read An Already Opened .csv File Using Stream Reader Object
11 Apr, 2008 - 04:38 AM
Post #2

D.I.C Regular
Group Icon

Joined: 15 Feb, 2005
Posts: 404



Thanked: 6 times
Dream Kudos: 175
My Contributions
reading a file in code should only really be done in the code, What I would suggest is you check to see if the file is open and if so, you close the file then open it back up in the streamreader
User is offlineProfile CardPM
+Quote Post

Jayman
RE: Cannot Read An Already Opened .csv File Using Stream Reader Object
11 Apr, 2008 - 07:36 AM
Post #3

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 6,919



Thanked: 42 times
Dream Kudos: 500
Expert In: C#, VB.NET, Java

My Contributions
Unfortunately you are going to have to work with the file closed. The issue is that when you have the file opened in an external application it locks the file to prevent other applications from editing it.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/1/08 07:48PM

Live C# Help!

C# Tutorials

Reference Sheets

C# Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month