Friday, June 25, 2010

Gotcha with Custom Report Memberdata Attribute Names in VFP 9 SP 2

(That must be the longest blog title in history!)

I’ve been (finally) implementing VFP 9 SP2 features in Stonefield Query (version 4.0 is due to be released next week) and, while doing some final testing, ran into an error when editing a certain object in the Report Designer. The error was 1712, “Field name is a duplicate or invalid”. In tracking the error down, it occurred in the XMLStrToCursor method of _FRXCursor, one of the report helper classes in the FFC. The statement causing the error was ALTER TABLE … ADD COLUMN … It’s not actually a table that columns are being added to but a cursor. The weird thing is that the columns being added didn’t exist in the cursor, so they certain weren’t duplicates.

I tweeted about this and Frank Perez Jr. responded “I think you also get that error if the field name is invalid (i.e. more than 10 characters in a free table).” Sure enough, that was the problem. Even though cursors can have field names longer than ten characters, ALTER TABLE can’t handle them, and given that there’s no ALTER CURSOR command, we’re stuck with it.

What lead to the error was that I added custom report memberdata to the specific object causing the problem. The custom memberdata had an attribute named “adjustwidth”, which is more than ten characters long. Changing it to “adjwidth” solved the problem. So, important safety rule (channelling Venkman here): don’t use names more than ten characters for your custom report memberdata attributes.

Thanks to Frank for pointing me in the right direction. Another reminder of the usefulness of Twitter.

Thursday, June 24, 2010

2010 Ceil Silver Ambassadors

Yes, that title is plural: thanks to the generosity of the VFP community, we have enough money to bring two developers to Southwest Fox as 2010 Ceil Silver Ambassadors. Geek Gatherings is pleased to announce that César Chalom and Bernard Bout have been selected as the ambassadors for Brazil and Australia, respectively. We are very excited that César and Bernard can attend Southwest Fox 2010 and know that many attendees are looking forward to meeting them in person.

Tuesday, June 15, 2010

Southwest Fox on the FoxShow

Andrew MacNeill interviews Rick Schummer, Tamar Granor, and I about Southwest Fox 2010 in FoxShow #65. As usual, it was a fun interview and he asked lots of interesting questions about what attendees can expect to see.

Friday, June 04, 2010

New VFP 9 SP2 and Sedna Book Available

After a really long time in gestation, “Making Sense of Sedna and SP2” has finally been published by dFPUG in both English and German. This book, co-authored by Tamar E. Granor, Toni Feltman, Cathy Pountney, Rick Schummer, Bo Durban, and me, goes into tremendous depth on VFP 9 Service Pack 2 and Sedna, including installation gotchas, things that work, things that almost work, and how to make the use of the new features in both products. “Making Sense of Sedna and SP2” is available now from Hentzenwerke Publishing as an e-book and will be available in printed version in July.