|
|
 |
| 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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

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,340
Thanks: 0
Thanked 26 Times in 26 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,340
Thanks: 0
Thanked 26 Times in 26 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
|
|
|
|
 |