🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.csharpbuilder.language.csharp
Article #665

'File in use' error after File.Create()

#665
From: John Fowler
Date: Thu, 23 Sep 2004 03:34
15 lines
1384 bytes
Hi!
I'm using the following to create a file (if it's not already present) 
to write strings to. When I do so, I get an error stating that the file 
cannot be accessed because it's in use by another process.

string saveFile = @"..\..\myStringFile.txt";
File.Create( saveFile );
myFlexGrid.SaveGrid( saveFile, FileFormatEnum.TextComma );


What is that process and how do I fix it?

Thank you for any and all help.

John F.
Technical Details
Message-ID: <4152442d$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,371711e74f47af5a,start
X-Google-Attributes: gid1efe35,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Wed, 22 Sep 2004 20:34:09 -0700
From: John Fowler <jfowler@pXoXl.net>
Reply-To:  jfowler@pXoXlX.net
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.csharpbuilder.language.csharp
Subject: 'File in use' error after File.Create()
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 24.20.189.226
Message-ID: <4152442d$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1095910445 24.20.189.226 (22 Sep 2004 20:34:05 -0700)
Lines: 15
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail