|
|
 |
| C# 2008 aka C# 3.0 Discuss the Visual C# 2008 (aka C# 3.0) language |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the C# 2008 aka C# 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other programmers’ questions, win occasional prizes given to our best members, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
|
|
 |

July 4th, 2009, 05:50 PM
|
|
Registered User
|
|
Join Date: Jul 2009
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
read from csv file
hi
i want to read from csv file, that file write with another program and i must read data in files in my program! i try it...
FileStream FS = newFileStream(strFileName, FileMode.Open, FileAccess.Read, FileShare.Read);
StreamReader SR = newStreamReader(FS, Encoding.Default);
string AllText = SR.ReadToEnd();
error :
used by another procsess...
plz help me
|

July 5th, 2009, 04:23 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 1,453
Thanks: 0
Thanked 50 Times in 50 Posts
|
|
If you get an error saying it in use by another process, then it is in use by another processor. Try getting hold of FileMon from Microsoft to see who has the file locked.
__________________
/- Sam Judson : Wrox Technical Editor -/
|
|
The Following User Says Thank You to samjudson For This Useful Post:
|
|

July 7th, 2009, 04:07 AM
|
|
Registered User
|
|
Join Date: Jul 2009
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by samjudson
If you get an error saying it in use by another process, then it is in use by another processor. Try getting hold of FileMon from Microsoft to see who has the file locked.
|
I downloaded fileMon from microsoft! i know who has the file locked, (another program that write to the file and lock it) and my program can't access to read from file but excel access to read from file in mode read-only
|

July 7th, 2009, 05:11 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 1,453
Thanks: 0
Thanked 50 Times in 50 Posts
|
|
You can try using FileShare.ReadWrite perhaps?
__________________
/- Sam Judson : Wrox Technical Editor -/
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |