Article View: borland.public.cppbuilder.nativeapi
Article #4105Re: FindFirst Open File Error
From: Vladimir Grigoriev
Date: Thu, 16 Mar 2006 11:52
Date: Thu, 16 Mar 2006 11:52
26 lines
1802 bytes
1802 bytes
You need only one FindClose() for the given FindFirst() and all subsequent FindNext(). The error that occurs in your code may be resulted from the proposoal that this->wpath + "\\" + sr.Name is not the same as this->AppPath + sr.Name Vladimir Grigoriev. "Orlando Lopez" <hlopezrd@hotmail.com> wrote in message news:441822d4$1@newsgroups.borland.com... > > Hi Gambit, > >You are not specifying any sharing rights: > > > > TStream *file = new TFileStream(this->AppPath + sr.Name, fmOpenRead | > >fmShareDenyWrite); > yes, but anyway, I only want to open the file using TClientDataSet > (there are XML files), but I was getting an EFOpen File error > using the TFileTream (using LoadFormFile). I could find that the FindFirst/FindNext > open the file with no shared. > I solved this using FindClose() after FindNext.
Technical Details
Message-ID:
<44195184$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<44170bbb$1@newsgroups.borland.com> <44176abd$1@newsgroups.borland.com> <441822d4$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,dfd9baf79c8d00b4 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Vladimir Grigoriev" <vlad.moscow@mail.ru> Newsgroups: borland.public.cppbuilder.nativeapi References: <44170bbb$1@newsgroups.borland.com> <44176abd$1@newsgroups.borland.com> <441822d4$1@newsgroups.borland.com> Subject: Re: FindFirst Open File Error Date: Thu, 16 Mar 2006 14:52:34 +0300 Lines: 28 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 195.212.29.163 Message-ID: <44195184$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1142509956 195.212.29.163 (16 Mar 2006 03:52:36 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail