Daily Archives: April 7, 2005

Stranger than fiction – wierd FoxPro (2.6 yes I said 2.6) query problem (and the kludge)

I have a client with one last holdout FoxPro 2.6 application. It manages all of their incredibly complex billing and is a work of art and works beautifully and someday we will upgrade it, not to make it better, but just because we will have to. But for now, just accept that fact and move on. 🙂

The woman who does the invoicing noticed an odd inconsistency that did not affect billing but a payroll report that was missing one person’s 3 hour stint for a particular day  – one of 3 rows that made up one guy’s particular day.

That report is created by a union of two queries. The first picks up all the data, the second picks up any body who didn’t have any hours that week (10 maybe 15 extra). I looked and looked at this then broke the queries into two. The record was there. Ran the queries with the union, the record was gone and the row count was off by one.

I have been fiddling with this all morning (it’s a disease, what can I say?) and there is no rhyme or reason for it. So I just bagged the union and did two queries and appended the results to each other.

But, no complaints. We are all ecstatic that this 8 year old program (which gets tweaked here and there from time to time) still works on the new computers and is great. Thanks to all who are responsible for that!!

http://www.AcehAid.org

typical “typo” for VB developers using C#

Someone who sat in on my C# for VB programmers session at Code Camp emailed with a little problem. DataSet.Table(“myTable”) was throwing the error

Error: ‘System.Data.DataSet.Tables’ denotes a ‘property’ where a ‘method’ was expected

It is such a common mistake we VB people make in C# because those parens are just totally second nature to us! Even I had to think about it a minute before I saw the problem! It’s

DataSet.Table[“myTable“]

The funny thing was seeing a C# programmer complaining that in VB, everything is parens and it makes it hard to tell if we are referring to a parameter or an element, making a method call or getting info out of an array/collection. Great perspective!


http://www.AcehAid.org