Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: Jun Tangunan
  Where is Jun Tangunan?
 Cabanatuan
 Philippines
 Jun Tangunan
 Tags
Subject: RE: TABLE LOCKED
Thread ID: 373287 Message ID: 373418 # Views: 33 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Friday, March 22, 2013 5:53:18 AM         
   


> >
> >
> > It depends on the way you use it - I'd say in most cases, the Form.DataEnvironment is just a cool feature and by using it one can get rid of tons of "If Not Used()", "Use", "Set Order", "Set Relation" and other lines along that topic
> >
> > One particular known issue is that the Form.DataEnvironment keeps track of full-path DBC locations, i.e. the "Dev Test" DBC that you used while designing the Form(DE).
> > So that in a hypothetical (test) run that DBC might get opened although a different one was intended and expected via explicit Set Path or Open Database lines.
> > But you can easily work-around it by modifying property content in a geneic loop in BeforeOpenTables() or in a ProjectHook.AfterBuild() - if the issue matters in your scenario anyway
> >
> > In other scenarios that issue would not matter, like for example if there is a Local-Views-only.DBC that is being created at run-time dynamically so that each Form.DE would contain Views only and no DBF alias.
> > Or simply if you do not have DevTest.DBCs at run-time and no realData.DBC on the Development machine
> >
> > However, personally I stopped using the traditional Form.DataEnvironment in newer projects because the CursorAdpapter class is IMO much more powerful than Views (which in turn are IMO much more powerful than DBF aliases).
> >
> >
> > BTW, as for the open all tables before SQL Selecting them suggestion: I'd say "Set Exclusive Off" is much easier and more straight forward - one line fits all,
> > as opposed to very many lines in a place like Form.Load() that has no relation whatsoever to all various places where SQL statements might or might not open tables, like embedded encapsulated member classes, "myComboBox" or so that cares for itself in its own Init() (for example)
> >
> >
> >
> > hth
> > -Stefan
>
> Very nicely explained! Thanks! :-)
>
> http://sandstorm36.blogspot.com
> http://weblogs.foxite.com/sandstorm36



You're welcome :-)

"ProjectHook.AfterBuild()" should have been "ProjectHook.BeforeBuild()", by the way



-Stefan

ENTIRE THREAD

TABLE LOCKED Posted by Pratik Singh @ 3/20/2013 7:25:10 PM
RE: TABLE LOCKED Posted by Stefan Wuebbe @ 3/20/2013 7:32:19 PM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/21/2013 12:58:29 AM
RE: TABLE LOCKED Posted by Pratik Singh @ 3/21/2013 6:15:48 AM
RE: TABLE LOCKED Posted by Tore Bleken @ 3/21/2013 6:46:38 AM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/21/2013 6:55:58 AM
RE: TABLE LOCKED Posted by Tore Bleken @ 3/21/2013 7:24:04 AM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/21/2013 8:49:45 AM
RE: TABLE LOCKED Posted by Tore Bleken @ 3/21/2013 9:04:54 AM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/21/2013 9:11:30 AM
RE: TABLE LOCKED Posted by Tore Bleken @ 3/21/2013 9:22:49 AM
RE: TABLE LOCKED Posted by mk sharma @ 3/21/2013 10:32:49 AM
RE: TABLE LOCKED Posted by Tore Bleken @ 3/21/2013 10:39:59 AM
RE: TABLE LOCKED Posted by mk sharma @ 3/21/2013 3:56:51 PM
RE: TABLE LOCKED Posted by Stefan Wuebbe @ 3/22/2013 12:30:32 AM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/22/2013 1:27:33 AM
RE: TABLE LOCKED Posted by Stefan Wuebbe @ 3/22/2013 5:53:18 AM
RE: TABLE LOCKED Posted by Tom Saddul @ 3/22/2013 5:51:54 AM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/22/2013 6:15:08 AM
RE: TABLE LOCKED Posted by Stefan Wuebbe @ 3/22/2013 6:48:48 AM
RE: TABLE LOCKED Posted by Tom Saddul @ 3/22/2013 9:03:11 AM
RE: TABLE LOCKED Posted by Stefan Wuebbe @ 3/22/2013 9:19:13 AM
RE: TABLE LOCKED Posted by Tom Saddul @ 3/22/2013 10:59:37 AM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/21/2013 6:57:13 AM
RE: TABLE LOCKED Posted by Tore Bleken @ 3/21/2013 7:22:35 AM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/21/2013 8:41:40 AM
RE: TABLE LOCKED Posted by Tore Bleken @ 3/21/2013 9:06:22 AM
RE: TABLE LOCKED Posted by Tore Bleken @ 3/21/2013 9:08:09 AM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/21/2013 9:01:32 AM
RE: TABLE LOCKED Posted by Tom Saddul @ 3/21/2013 12:21:28 PM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/22/2013 12:07:32 AM
RE: TABLE LOCKED Posted by Tom Saddul @ 3/22/2013 3:21:31 AM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/22/2013 3:29:01 AM
RE: TABLE LOCKED Posted by Tom Saddul @ 3/22/2013 5:33:08 AM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/22/2013 6:28:07 AM
RE: TABLE LOCKED Posted by Tom Saddul @ 3/22/2013 9:05:35 AM
RE: TABLE LOCKED Posted by Paul Gibson @ 3/22/2013 10:35:58 AM
RE: TABLE LOCKED Posted by Stefan Wuebbe @ 3/22/2013 7:14:18 AM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/22/2013 7:40:37 AM
RE: TABLE LOCKED Posted by Stefan Wuebbe @ 3/22/2013 8:51:44 AM
RE: TABLE LOCKED Posted by Paul Gibson @ 3/21/2013 5:52:57 PM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/22/2013 12:08:17 AM