Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: barney guna
  Where is barney guna?
 BANALORE
 India
 barney guna
 To: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 Tags
Subject: RE: In network file in use by another user
Thread ID: 395678 Message ID: 395688 # Views: 44 # Ratings: 0
Version: Visual FoxPro 6 Category: General VFP Topics
Date: Friday, January 17, 2014 8:50:36 AM         
   


> > Dear Sirs
> > When working in a Network, if one system is being used, another system says that the dbf is in use by another user!
> > Error : File is use by another user
> >
> > I have tried:
> > set excl off
> > in the init of first form
> > Regards
> > Barney
>
>
> As Vivek said, form.Load() runs before form.Init(), and is the place where any "manual" USE commands might make sense (because Form members, controls do not exist yet and will be happy if their ControlSource / RecordSource / RowSources are available when they'll get instantiated later on).
> FWIW, if you use the SCX Form.DataEnvironment feature, so that you do not need explicit USE lines, Vfp would by default open tables in Shard mode anyway, even before form.Load() runs.
>
> And as Raju said, if you use the "Shared" clause of any "Use" command in your code, then Set Exclusive does not matter for that USE attempt.
>
> So that an alternate approach can be to Set Exclusive Off only once early in your project's "main.PRG" -
> because in typical VFP Form.DataEnvironment scenarios the only thing that could unintentionally get opened exclusively is the database container DBC, which implicitly happens when the first table or View is getting opened.
> So that in that scenario "Set Exclusive Off" would still not be wrong but can be superfluous if you explicitly "Open yourDatabase Shared" early in "main.PRG" before any Form.DataEnvironment would try to do so implicitly
>
>
>
> hth
> -Stefan
Dear Stefan,
Now it has started working without any problem...!
Use with shared again works fine !
Regards
Barnabas

ENTIRE THREAD

In network file in use by another user Posted by barney guna @ 1/17/2014 5:38:19 AM
RE: In network file in use by another user Posted by Vivek Deodhar @ 1/17/2014 6:06:51 AM
RE: In network file in use by another user Posted by barney guna @ 1/17/2014 7:43:14 AM
RE: In network file in use by another user Posted by Raju Shrestha @ 1/17/2014 6:52:36 AM
RE: In network file in use by another user Posted by Stefan Wuebbe @ 1/17/2014 8:21:08 AM
RE: In network file in use by another user Posted by barney guna @ 1/17/2014 8:50:36 AM