* IndexOnLongFieldNameInBoundTable.prg - execute prg to create repro project * 2003-11-18 sherlog@t-online.de * VFP3 .. VFP8 * * Project manager reports 'LONGFIELDNAME' not found if DBF is included in the * app, regardless of whether the DBC is included or not. The issue is caused * by using a long field name in an index tag of an included table. #if .t. && index on short field name -> OK, index on long field name -> error # define FIELD_TO_INDEX LongFieldName #else # define FIELD_TO_INDEX ShrtName #endif if version(2) == 2 and upper(justext(sys(16, 1))) == "FXP" = BuildProject_() else && app/exe = MessageBox(sys(16), ".woeM") endif ******************************************************************************* #define PRJ_NAME IdxOnLongFieldNameInBoundTbl #define TEST_DBC IdxOnLongFieldNameInBoundTbl_DBC #define TEST_DBF IdxOnLongFieldNameInBoundTbl_DBF procedure BuildProject_ release window [Project Manager - PRJ_NAME] && avoids 'file in use' error * create DBC & table do while dbused([TEST_DBC]) set database to TEST_DBC close database enddo create database TEST_DBC create table TEST_DBF (LongFieldName i, ShrtName i) index on FIELD_TO_INDEX tag foo close database * create the project local cSys16, cPrgName, o cSys16 = sys(16) cPrgName = forceext(substr(m.cSys16, at(" ", m.cSys16, 2)), "prg") build project PRJ_NAME ; from (m.cPrgName), [TEST_DBC.dbc], [TEST_DBF.dbf], home() + "FoxTools.fll" * VFP.ActiveProject requires VFP6 or later ... update PRJ_NAME.pjx set EXCLUDE = .F. where TYPE $ "dD" use in PRJ_NAME build app PRJ_NAME from PRJ_NAME recompile modify project PRJ_NAME nowaitThis should probably be submitted to http://support.microsoft.com/default.aspx?scid=/support/vfoxpro/report/report.asp&sd=msdn.