Archive

Posts Tagged ‘VFP’

Oct
02

I am working on a project to enhance an existing application, and in the process I am updating it from VFP 5 to VFP 9 (more stable, less filling). I thought I was going to take advantage of the multiple detail band features of the new Report Designer, but decided on another approach. The update from VFP 5 to VFP 9 has been smooth with the help of three lines of code:

SET ENGINEBEHAVIOR 70
SET REPORTBEHAVIOR 80
_screen.Themes = .F.

That is until yesterday…

The users acceptance testing revealed two bugs that are related. The application has some calculations on a report, and the calculations were evaluating incorrectly. The users pointed me toward a number not being included in the final results, but the formula definitely included the table column in question. It turns out that data was not being correctly pulled from the SQL Server database.

My debugging session showed no records in a certain scenario. I initially thought it had to do with the data in the base tables in SQL Server not having the conditions. and told the users they needed to set up data that met the criteria. They did and it still did not pull any data. Things that make you go hmmmmm.

What I found out in closer inspection is the original developer made a local view of two remote views. The code USEs the one local view with NODATA and later does a REQUERY(). Years ago I observed strange behavior with views based on other views and have stayed away from them. This situation is even “stranger” since it is a local view based on two remote views. Looking a the code, I never gave it a thought this was the case. I assumed (incorrectly of course) that this was a view pulling data directly from SQL Server.

In VFP 9, when you open a view NODATA, and the view is based on other views that are not yet USEd, the underlying views are also opened with NODATA.

In VFP 8 and earlier (I tested every version back to VFP 5), when you open a view NODATA and the other views are not yet USEd, only that view is opened with NODATA and the underlying views are opened with data.

Back to VFP 9, issuing the REQUERY() on the view requeried no records because the other views were already empty. Ugh. It was not the SQL Server data not meeting the criteria after all, it was the local cursors being empty.

The fix is easy: open the underlying views first, then open up the original view and REQUERY(). Fortunately the IT manager who is my customer understands how things like this can happen. He has been waiting to hear the “VFP 9 update excuse” during this testing period. He is a .NET developer so we had some fun jabbing each other’s favorite developer tool.

I also tested this same issue with a local view of two other local views. Same behavior. It is not remote view specific. Unfortunately I cannot find any documentation in the Help file with respect to this behavior change, so I thought I would post it here and possibly save someone else some aggravation down the road. I never ran into this because I do not do view-on-view coding, but I know others do and this is something you should be aware of when you use this technique.

, ,

Sep
27

Just in case you have not subscribed to our new RSS feed (recently created for us by Rick Borup), we have a change in the schedule for Saturday. The Arizona Golf Resort and Conference Center notified us of a change in the venue that really helps us and triggered a slew of changes I want to make sure you hear about. Previously we had the pre-conference sessions and keynote in another building, but now all sessions will be in Fairway 1-4. Another conflicting event in the same building Saturday night has been moved too.

What this means is:

  1. The vendor sessions on Saturday will be full 75 minute sessions.
  2. Lunch has been extended to a full hour (previously we had to crunch it to 45 minutes).
  3. A new version of Dave Aring’s Kokopelli scheduling app has been updated this morning (so if you previously downloaded it please get a fresh copy). There are no changes to the regular sessions, but we did include the new Visual MaxFrame and Stonefield Query user group meetings on the printed schedule.
  4. You will have more opportunities to visit the vendors (more to be announced soon on this topic soon).

Behind the scenes things are nuts. Over the last three days I probably have 250 emails on various aspects of Southwest Fox. We are close to 140 registered attendees and more than 160 people including speakers and vendors coming to the conference.

Only three weeks to go until we meet in Mesa.

, ,

Sep
17

So are you looking at getting a book from Hentzenwerke Publishing (our newest Bronze sponsor), but want to chat in person with the publisher or one of the many authors in person before picking it up, or ordering it? No problem, just be in Mesa between October 18th and 21st and stop by the registration desk.

Whil (who is presenting a couple of sessions at the conference) is selling his entire line of Visual FoxPro books between sessions at Southwest Fox. Just in case you did not know, Hentzenwerke is the biggest publisher of VFP books on the planet.

As one of the many Hentzenwerke authors and tech editors I know the books sell best at conferences so this is very exciting news. The conference just keeps getting better.

Only a month to go before we all gather in Mesa.

, ,

Sep
11

Honestly, I never thought this was something I was going to announce when we decided to work on Southwest Fox 2007, but we are setting new registration records almost daily! We still have more than a month to go and we have close to 150 people set to come to Mesa in October. Unbelievable.

So THANKS!

Only 37 days to get registered! See everyone in Mesa.

, ,

Sep
11

Yep, we are getting close to the conference, but more companies are getting on board the already crowded Southwest Fox Conference sponsor bus. I want to introduce you to xSQL Software. These guys have some cool SQL Server tools and have become our newest Bronze sponsor.

One tool in particular is a tool I have been looking for for more time than I care to admit. I think their xSQL Builder tool is as close to the Stonefield Database Toolkit Update feature for SQL Server as any product I have looked at. I am hoping to cover this tool during my SQL Server Developer Toolkit session.

xSQL Software is providing several doorprizes to be given away during the conference. Very cool stuff.

, ,

Sep
08

I am glad to see there are some live bloggers at FoxForward so I can hear about sessions and things going on at the conference. I am occasionally getting an instant messages from people at the conference too, which makes me want to be there even more than I did before the conference started.

Sounds like things are going well and some fun is being had by all.

I even had something added to my DAFUG to-do list {g}. Tod, interested in coming to Detroit in the near future?

Looking for the inside story? Check here:
Dave Crozier (all the way from England)
Kevin Cully (how the heck does the organizer guy have time??)
Steve Bodnar (speaking at the conference)
Tod McKenna (speaking at the conference)

There are a couple of other bloggers hanging out and speaking too so I am looking forward to reading their observations and thoughts too.

, ,

Sep
05


Today I get to leak the cat out of the bag for a new “feature” of Southwest Fox: K.O.K.O.P.E.L.L.I.

What the heck is K.O.K.O.P.E.L.L.I.??

One Web description is:

“Kokopelli is one of the most intriguing and widespread images surviving from ancient Anasazi Indian mythology, and is a prominent figure in Hopi legends. The figure represents a mischievous trickster or the Minstrel, spirit of music. Kokopelli is considered a symbol of fertility who brought well-being to the people, assuring success in hunting, planting and growing crops, and human conception.”

Another description:

“Magical flute player, humpback or hump-backed flute player”

You see three Kokopelli characters on the Southwest Fox logo. But today I bring a different definition to you…

Knock Out Konference Orientation – Produce Elective Lecture Layout Interactively.

What?!?

Dave Aring (from Visionpace – owners of the VFP framework MaxFrame Professional) has created a new Visual FoxPro applet that assists you in selecting a schedule customized for you based on the choices and preferences you have for the session slots. The app is quite simple: pick your favorite three sessions in any one slot for the entire conference. The application then uses a magical algorithm to determine the best fit so you get as many of your favorite sessions as possible.

You pick your priorities for the slots, click on the Create Schedule button, and then the Print Schedule button to preview the results. The output can be printed and brought with you to Mesa. The printed schedule when folded on the lines provided should fit nicely in the badge holder we will provide when you register Thursday.

The applet comes complete with text Help, and an interesting approach with truly graphical Help. Dave even included a block out feature so you can schedule session blocks you plan on skipping. Maybe the boss wants you to attend a conference call or staff meeting, or you have a session to give in that slot (can you tell what three organizers asked for this enhancement request {g}), or you just want to play hooky and attend one of the less formal offline sessions that happen in the hallway.

You can try out different session priorities to get different results. If you already know the sessions you want to attend you can just make them your number one sessions and not pick the 2nd and 3rd, and your schedule can be printed out.

In the user acceptance testing phase of this app I found it picked 50% of the sessions I had slotted with the “Rick Schummer Method” to picking sessions. I think this is pretty good. I hope you download it and give it a try, if not to help pick some sessions, but just to see how Visual FoxPro applications can be created and not look like your typical VFP app.

For more details on the new tool, see Dave’s blog entry on the Visionpace blog.

Thanks Dave for putting this together in your spare time and for contributing it to Southwest Fox!

Only 43 days until we all meet in Mesa!

, , ,

Aug
29

I wanted to follow up on the issue of Flushing Windows Cache in VFP 8, and some resolution for my client who you may recall is another developer.

This has been a very frustrating experience because VFP 8 is fundamentally not working in all cases and hardware configurations as one would expect with SET REFRESH. The data refreshes fine when pulled from my server, has failed on the C-drive of my XP machine, and works fine when run on my external USB drive. My client can reliably get it to fail on his Windows 2003 Server. Sure we have a workaround with RLOCK(), but you have to wonder why VFP 8 works as expected in some cases and not in others, and what potential problems do we have if RLOCK() reduces performance, or the technique does not resolve 100% of the problem.

So I had my client recompile the test applet in VFP 9 to see if the problem is reproducible in VFP 9. I know Microsoft is not going to develop a fix for VFP 8, but with VFP 9 SP2 in beta we might still have a chance to get something resolved if it is broken. It is definitely easier to go to tech support with a VFP 9 problem. Mind you, at the beginning of this journey I instinctively mentioned to my client how Microsoft introduced the FORCE FLUSH and how this interacts with the Windows API to get the changes to disk, so maybe they saw a problem with the SET REFRESH and worked to solve this in VFP 9.

Sure enough, my client recompiled his test applet in VFP 9 and all is well with the SET REFRESH. The test applet is showing the changes to the table in the second instance of the application in all the test configurations. So the good news (at least in this case) VFP 9 is more stable and reliable than VFP 8.

I think the recompile in VFP 9 with a complete system test is the best route to go anyway. It is just FORCEing his hand (sorry for the intentional pun) to make the move a little sooner than he hoped for in the scope of his project.