Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 To: Pedro Sousa
  Where is Pedro Sousa?
 Felgueiras
 Portugal
 Pedro Sousa
 Tags
Subject: RE: Data Environment
Thread ID: 112380 Message ID: 112466 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 Category: Errors & Debugging
Date: Wednesday, November 08, 2006 9:14:34 PM         
   


> > > An application on Windows Server 2003-terminal Server, in VFP6, 25 users, ran without problems since 4 years ago.
> > >
> > > I release an upgrade compiled in VFP9.
> > >
> > > This application is composed for:
> > > 4 .dbc with 250 tables
> > > 280 forms
> > > Menus, reports, etc,
> > > A . exe with 10.5MB
> > >
> > > All forms hold the following configuration:
> > > .DataEnvironment.AutoCloseTables = .T.
> > > .DataEnvironment.AutoOpenTables = .T.
> > > .DataSession = 2 (Private DataSession)
> > >
> > > Sometimes, in a sporadic way, in arbitrary forms or users ( about 5 occurrences / day), in operations repeated a lot of times a day with success, the following mistake happens when a form is released:
> > >
> > > On .Data Environment.CloseTables
> > > Error 1967 – Data Environment is already unloaded.
> > >
> > > Somebody can give me tips about this.
> > >
> > > Regards
> > > Pedro Sousa

> >
> > Pedro,
> >
> > What do you have in your .CloseTables() event? Can you give us the line of code that is causing the error?
> >
> > Ken
> > You shall know the truth - and the truth shall set you free. (John 8:33)

>
> Thank you, Ken.
> I don't have any code in .CloseTables() event. Nor in the form nor in class.
> This error never appeared during the tests wants in single user wants in final simulations over multi-user (3 users).
> Pedro


I am not sure what is going on here then. This is very definately strange behaviour. 25 users doesn't really seem to be a lot, but it could be that at peak times, you are over-stressing your server resources. What have you got for memory on that server?

I am not sure if this will help, but in your data environment's .Destroy, you could issue a FLUSH.

Ken
You shall know the truth - and the truth shall set you free. (John 8:33)

ENTIRE THREAD

Data Environment Posted by Pedro Sousa @ 11/8/2006 2:52:23 AM
RE: Data Environment Posted by Ken Murphy @ 11/8/2006 3:27:42 AM
RE: Data Environment Posted by Pedro Sousa @ 11/8/2006 9:00:20 PM
RE: Data Environment Posted by Ken Murphy @ 11/8/2006 9:14:34 PM