Archive

Posts Tagged ‘VFP’

Aug
29

The initial session schedule for Southwest Fox is posted! Please note that the organizers have reviewed it and passed it by the speakers, but it is still subject to change if we discover a flaw. This will be finalized over the next couple of weeks.

You may be wondering how did I get two 8:00am sessions?!? You think I would have some pull being one of the organizers, but no, Tamar thinks I am good enough to keep people awake on Saturday and Sunday morning (at least this is what I am telling myself {g}). Seriously, I am not really complaining because I don’t mind the first session of the day.

I went through the schedule a few weeks back and picked the sessions I would like to attend (knowing darn well I might not get to any of them) and I only had one I could not schedule. There are definitely some tough choices, but that is the idea. We packed this conference with lots of great sessions presented by some of the best minds available.

I have two recommendations to those who cannot see all the sessions they really have to see. One thing I am doing is seeing sessions in advance of the conference. Check out the Fox user groups around the country kind enough to let speakers test-drive the sessions before they might be ready for prime-time at the conference. I see the Detroit Area Fox User Group (my local group) and the Chicago FUDG already have presentations scheduled. I am sure other groups will be scheduling some soon. You can find some of the user group meetings on the Fox Wiki Upcoming Events page.

The other option is to bring a teammate or friend to the conference (yes there is still time to register and we are not sold out yet {g}). You can each see different sessions and later go over the material you learned to help the other person as you review the white papers from the session together.

Only 50 days until we meet in Mesa!

, ,

Aug
18

I have a customer who is a developer using VFP 8 so we cannot use the new FLUSH FORCE functionality.

Here is the observation. Simple form with a private datasession opens the table and displays the data in the standard grid. The table is one of your typical USER tables and it has a logical flag in it to show if a user is logged in or not. The management like to occasionally check to see who is logged in or not. SET REFRESH is set to 10, 10 so every 10 seconds VFP should be refreshing the local buffers.

I can load up the app on my Windows 2003 server and the form performs as expected. As I start instances of the EXE and login as different users I can see the Flags change to true once the grid is refreshed or I move through the records after the 10 seconds.

If I run the EXE on a Windows XP SP2 machine and run multiple instances of the EXE on the same machine I do not get the data refreshed. I have even seen where I run the same form in the same EXE instance set up its own datasession with the old data.

Now I know the private datasessions are doing a USE AGAIN which does not go out to disk and get a fresh buffer, and uses the current cache to set up the new workarea. I also know if we throw in a simple RLOCK() it will refresh the cache.

It would be nice if all the installs were on a real server, but some of the end users are in a peer-to-peer environment and this is causing problems with the refreshing of the data.

My question is: is there something in Windows where we can turn off the data caching? I have hunted everywhere and I cannot find anything. I am recalling reading some where that Window 2003 has this shut off by default, but XP does not, but I cannot find the source of the material I read. Obviously Windows is caching the data or the Fox Team would not have added the FORCE clause for the FLUSH command.

The app cannot be migrated to VFP 9 to take advantage of the FLUSH FORCE. My recommendation to date is to use the RLOCK() “workaround”, but understandably if the developer has a toggle of a setting in Windows he would save himself the time of updating 50 forms, performing a complete system test, and the time it takes to redeploy to all his customer locations.

I would appreciate any insight any of you might have.

UPDATE 08-Aug-2007 @10:28 PM: passed along from fellow VFP MVP Fred Taylor on where to set the Windows Write Caching…

“If you mean the disk write caching, in XP bring up a My Computer and right-click on the disk you want, then choose properties. Then under the Hardwaretab, select the actual disk device and then use the Properties button. Under the Policies tab, there should be a check box for write disk caching there.”

I appreciate the help Fred!

Aug
18

One of my customers who is a developer described a form he built with the following scenario:

  1. Private Datasession, single DBF table
  2. Load event method opens the table and runs a SQL-Select of all the records into a cursor
  3. Display of the records in the cursor in a grid. Grid RecordSource is the name of the cursor.
  4. Observes the data change in the grid when users are changing the data in the base table on other machines in the office.
  5. There is not code to rerun the SQL-Select, and no timers on the form.

His question to me is: how the heck does this happen? Good question.

His assumption was that the cursor data was stagnant since he queried it from the base table into the temporary cursor. Initially I agreed with him and we both thought we were going crazy, but then I remembered something I observed many years ago.

When you perform a SQL-Select and the VFP data engine determines it can be Rushmore optimized, behind the scenes VFP creates a new workarea, which is the same as the open table in another workarea via the USE AGAIN, and applies a Rushmore optimized filter to the new workarea. In essence, the cursor is really passing through the raw table information in the grid he used to display the data. So changes made to the table by the other users in the system are reflected in the grid based in the settings of SET REFRESH.

At first we thought we were nuts, and I had to step through the debugger to ensure the grid was really bound to the cursor and not directly to the table.

One way to avoid this gotcha is to use the INTO CURSOR …. NOFILTER clause on the query. It will slow things down a bit since it is forcing the cursor to be written to disk, but you will not get the filtered table, you get a real stagnant cursor.

Hopefully you will remember this situation if you run into the weird and maybe unexpected behavior.

Aug
15

I was getting creative this evening with the VFP Session class. I was getting tired of changing the DataSession each time I created a private DataSession with the following code:

loSession = CREATEOBJECT("Session")SET DATASESSION TO (loSession.DataSessionId)

So I created a class in a program and added this code to the Init() of the Session class:

SET DATASESSION TO (this.DataSessionID)

This does not work, the DataSession stays with the current DataSession. So I created a custom method in the Session class and called the method externally. Same result. Here is my test program:

LOCAL loSession as Session

?"--------------"?"Should be default DS 1: ", SET("Datasession")

loSession = CREATEOBJECT("Session")SET DATASESSION TO (loSession.DataSessionId)

?"Should be DS > 1: ", SET("Datasession")loSession = .NULL.

?"Should be default DS 1: ", SET("Datasession")

* Now work with a customized session classloSession2 = CREATEOBJECT("pssSession")?"Would think this would be DS > 1 after set in " +; "Init(): ",; SET("Datasession")

loSession3 = CREATEOBJECT("pssSession")loSession3.SetSession()?"Would think this would be DS > 1 after set in " +; "Init() and custom method: ",; SET("Datasession")

loSession2 = .NULL.loSession1 = .NULL.

?"Should be default DS 1: ", SET("Datasession")

RETURN

*************************************DEFINE CLASS pssSession AS Session

DataSession = 2

PROCEDURE Init * Does not set the datasession to the * private DataSession, why? SET DATASESSION TO (this.DataSessionID)ENDPROC

PROCEDURE DestroyENDPROC

PROCEDURE Error(nError, cMethod, nLine)ENDPROC

PROCEDURE SetSession * Does not set the datasession to the * private DataSession, why? SET DATASESSION TO (this.DataSessionID)ENDPROC

ENDDEFINE*: EOF :*

In my mind it should work and for some reason I could not explicitly understand why it does not. Then it hits me, the object is created in the current DataSession, thus when code returns from the Session object back to the calling program, VFP is automatically returning to the current DataSession. This is a common trap I see developers falling into when debugging code that is changing data in an object that was created in the VFP Default DataSession (DS 1). Not exactly the same thing, but very similar. Tonight I fell into the trap.

I proved this was the case by adding code in the Init and SetSession methods to display the current DataSession after the switch, and the DataSession is getting set in code, then reset when returning to the calling code.

Now I understand why I always use the following code when creating and moving to a private DataSession:

loSession = CREATEOBJECT("Session")SET DATASESSION TO (loSession.DataSessionId)

Maybe this will save you an hour of frustration down the line.
(edited to make sure code word-wrapped for visibility)

Aug
13

I am very happy to announce F1 Technologies is officially a Gold sponsor of Southwest Fox 2007, and is making a very generous offer to each and every registered attendee of Southwest Fox. Here is the official deal:

  1. All registered attendees of the SW Fox Conference that are not registered Visual FoxExpress users will receive a free copy of Visual FoxExpress including a 6 month subscription.
  2. All registered attendees of the SW Fox Conference that are registered Visual FoxExpress users will receive a 50% discount on a renewal of their Visual FoxExpress subscription.
  3. This offer is non-transferable and expires on 11/20/2007.

Wow. Mike and Toni have always been big supporters of the conference, and this is another fine example of F1 Technologies commitment to the Fox Community.

There is still some time and space available if you want to get registered. Only 66 days until we meet in Mesa!

Thanks Mike and Toni!

, ,

Aug
09

Catching up on the sponsors front… I want to announce two new sponsors recently signed up:

1) The Intellection Group, Inc. is a bronze sponsor. Dave Bernard is one of the leaders of this company and speaks at VFP conferences, and has been a friend of Southwest Fox at past conferences by writing up coverage on the UniversalThread. Dave’s company does some really cool stuff with Visual FoxPro on the Web, and is well know for his mantra: “There are no technical problems, only business problems.”

2) Servoy USA Inc is a gold sponsor. Servoy is making a serious push to FoxPro developers with their Java application development and deployment tools. I really do not know much about this company, but figure this is one of the reasons they are coming to Southwest Fox – to get their message out to the Fox Community.

More details about all the Southwest Fox Sponsors can be found here: http://swfox.net/sponsors.aspx

, ,

Aug
04

I am happy to announce I will be returning to Germany again this November to present at the 14th Microsoft Visual FoxPro Developer Conference 2007. This is a fantastic conference put on by Rainer Becker and his team. Rainer has an excellent collection of presenters presenting 60 VFP sessions:

English speaking: Marcia Akins, Craig Berntson, Steven Black, Jim Booth, Alan Griver, Doug Hennig, Venelina Jordanova, Andy Kramek, and Rick Schummer.

German speaking: Marcus Alt, Rainer Becker, Joachim Durr, Sebastian Flucke, Uwe Habermann, Jochim Hilgers, Kirsten Hinrichs, Armin Neudert, Michael Niethammer, Patrick Scharer, Markus Winhard, Christof Wollenhaupt, and Jurgen “wOOdy” Wondzinski.

I will be presenting four sessions:

  • SQL Server Toolkit for the VFP Developer
  • Fishing with a ProjectHook
  • VFPX Tools and Components – Live
  • Creating Help – Made Easy!

The conference is held at a terrific conference center that serves the best food you could ask for. There are lots of opportunities to network and vendors to visit as well. If you want to learn more about this popular conference you can read some of my blog entries in November 2006 and 2005 (see the index on my blog). I really recommend this conference!

, ,

Aug
03

I am please to announce Mike Roof is the lucky winner of the White Light Computing $300 Scholarship for the Southwest Fox 2007 conference. Mike’s company is sending four people to the conference so they increased their odds of winning {g}. I talked to Mike yesterday and he is very psyched about not only attending Southwest Fox, but he is also attending the West Wind Technologies Double Impact training the two days before Southwest Fox. We laughed how much his head will hurt after listening to Rick Strahl for two days, followed by two and a half more days of intense conference sessions. A fantastic training opportunity for any developer. It sounds like a lot of developers are taking advantage of this year.

Sorry for the delay in the announcement, but I ran out of time before my vacation and forgot to hold the drawing. Mike’s name was drawn by the lead marketing advisor here at White Light Computing out of the 85 names registered by July 1, 2007.

Congratulations Mike! Only 76 days until we meet in Mesa!

, , ,