Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Bernard Bout
  Where is Bernard Bout?
 Brisbane
 Australia
 Bernard Bout
 To: joe Gonzalez
  Where is joe Gonzalez?
 
 Philippines
 joe Gonzalez
 Tags
Subject: RE: 255 char length of CA's and other tips
Thread ID: 49019 Message ID: 51276 # Views: 7 # Ratings: 0
Version: Visual FoxPro 8 Category: Projects and Design
Date: Friday, September 10, 2004 8:41:03 AM         
   


Here's how the CA Builder from www.mctweeedle.com solves this problem.

A method is created in every CA - autoupdate and is called on init. Here is the code from the method in one of my CA's. As you will see it is not only the cursor schema that is set up. To make the Cursor updatable, the NameList and FieldList too are needed. The Square brackets were added to the builder code by me to overcome the Leyword problem with SQLServer. If you intend to use CA's you cannot go past this builder. The VFP native builder is too slow and useless to generate something like this. I am able to generate CA's for all my data tables in less than a minute for over 100 tables AND views. The VFP builder does not even come close.

*CACLIENT::AUTOUPDATE
#DEFINE VFP_CRLF CHR(13) + CHR(10)

LOCAL lcFieldList, lcNameList, lcFuncList, lcSchema
STORE '' TO lcFieldList, lcNameList, lcFuncList, lcSchema

TEXT TO lcSchema NOSHOW PRETEXT 2
ACCTNAME C(30),
ACCTTYPE C(15),
ADDEDDATE D,
ADDPMT L,
ALTCODE C(10),
ASSDT D,
ASSNXT D,
BANK C(3),
BANKACCT C(10),
BANKNAME C(3),
BANKSID C(6),
BRANCHNAME C(35),
BSB C(3),
CARDHELD L,
CCARDOK L,
CCEXPIRE D,
CCHOLDDTE D,
CCHOLDER C(20),
CCHOLDWHY C(15),
CCNAME C(20),
CLIENTNAME C(51),
CLIENTNO C(14),
CLIREF C(10),
CLIUPDATE D,
CLSUSPEND L,
COMMENCING D,
CONTNO C(10),
CREDITCARD C(20),
CTRYCODE C(10),
DATESTAMP T,
DC00 D,
DC99 D,
DDHOLDDTE D,
DDHOLDWHY C(15),
DEBITDAY C(10),
DEBITHELD L,
DEBITOK L,
DEBTLETDAT D,
DEBTLETNAM C(10),
DOB D,
EMAIL C(60),
EMERGNAME C(25),
EMERGPHONE C(15),
EMPLOYER C(20),
ENTRYID C(6),
ENTRYMEMO M,
ENTRYPRES L,
EXERDESC C(40),
EXERNOW L,
FAX C(15),
FIRST C(20),
FLAG L,
GIRLBOY C(10),
GYMNAME C(40),
GYMID C(3),
GYMSTATE C(3),
HISTAVET N(8,2),
HISTCOMENC D,
HISTT N(10,2),
HISTTOT N(7,0),
HISWK N(11,2),
HOLDMAIL D,
HOLDPAY D,
HOMEPHONE C(15),
IBODYBUILD L,
IGENERAL L,
IMUSCLE L,
INITIALS C(3),
INSTRUCTOR C(20),
INVOICETOT N(12,2),
INVTOT N(12,2),
IOTHER L,
IREHAB L,
ISPORTCOND L,
IWEIGHTDWN L,
IWEIGHTUP L,
LAST C(30),
LADD4 C(35),
LADD1 C(35),
LADD2 C(35),
LADD3 C(35),
LASTDAY N(12,0),
LASTVIS D,
LETTER2GO C(10),
LSTATE C(3),
MARITAL C(10),
MIDDLE C(15),
MISSED I,
MOBILEPH C(20),
NAME C(45),
NEWCONTACT L,
NOMAIL L,
NOTES M,
OCCUPATION C(20),
OK_2GO_LIV L,
OTHERINT C(60),
OUTSTANDIN N(12,2),
OVERDUECAT N(3,0),
PADD4 C(35),
PADD1 C(35),
PADD2 C(35),
PADD3 C(35),
PAIDADFTOT N(12,2),
PAIDCLBTOT N(12,2),
PAYFREQ C(15),
PCOUNTRY C(10),
PHONE C(15),
PHOTO C(60),
PMTBALANCE N(12,2),
PMTDUE D,
PMTLAST D,
PPOSTCODE C(4),
POSTCODE C(4),
PROSPECT C(15),
PSTATE C(3),
PURCHNUM I,
PURCHTOTAM N(12,2),
RECPTTOT N(12,2),
REFCOUNT N(6,0),
RELATIONSH C(15),
REVERSETOT N(12,2),
REVERSFLAG L,
SOURCE C(20),
STATUS C(2),
STDCODE C(3),
SUSPMEMO M,
SWIPECODE C(100),
TAGSISSUED N(4,0),
TERMT N(8,2),
TERMTOT N(6,0),
TERMWK N(6,2),
TITLE C(10),
TMAVET N(6,2),
TOTALCALLS N(4,0),
TRADE L,
TYPE C(20),
WHOUPDATE C(20),
WITNESS C(15),
WORKPHONE C(15),
YEARAVET N(6,2),
YEARTOT N(8,2),
YEARTOTAL N(6,0),
YEARWKLY N(6,2)
ENDTEXT
lcSchema = STRTRAN(lcSchema, VFP_CRLF, [ ])

TEXT TO lcNameList NOSHOW PRETEXT 2
ACCTNAME Client.[ACCTNAME],
ACCTTYPE Client.[ACCTTYPE],
ADDEDDATE Client.[ADDEDDATE],
ADDPMT Client.[ADDPMT],
ALTCODE Client.[ALTCODE],
ASSDT Client.[ASSDT],
ASSNXT Client.[ASSNXT],
BANK Client.[BANK],
BANKACCT Client.[BANKACCT],
BANKNAME Client.[BANKNAME],
BANKSID Client.[BANKSID],
BRANCHNAME Client.[BRANCHNAME],
BSB Client.[BSB],
CARDHELD Client.[CARDHELD],
CCARDOK Client.[CCARDOK],
CCEXPIRE Client.[CCEXPIRE],
CCHOLDDTE Client.[CCHOLDDTE],
CCHOLDER Client.[CCHOLDER],
CCHOLDWHY Client.[CCHOLDWHY],
CCNAME Client.[CCNAME],
CLIENTNAME Client.[CLIENTNAME],
CLIENTNO Client.[CLIENTNO],
CLIREF Client.[CLIREF],
CLIUPDATE Client.[CLIUPDATE],
CLSUSPEND Client.[CLSUSPEND],
COMMENCING Client.[COMMENCING],
CONTNO Client.[CONTNO],
CREDITCARD Client.[CREDITCARD],
CTRYCODE Client.[CTRYCODE],
DATESTAMP Client.[DATESTAMP],
DC00 Client.[DC00],
DC99 Client.[DC99],
DDHOLDDTE Client.[DDHOLDDTE],
DDHOLDWHY Client.[DDHOLDWHY],
DEBITDAY Client.[DEBITDAY],
DEBITHELD Client.[DEBITHELD],
DEBITOK Client.[DEBITOK],
DEBTLETDAT Client.[DEBTLETDAT],
DEBTLETNAM Client.[DEBTLETNAM],
DOB Client.[DOB],
EMAIL Client.[EMAIL],
EMERGNAME Client.[EMERGNAME],
EMERGPHONE Client.[EMERGPHONE],
EMPLOYER Client.[EMPLOYER],
ENTRYID Client.[ENTRYID],
ENTRYMEMO Client.[ENTRYMEMO],
ENTRYPRES Client.[ENTRYPRES],
EXERDESC Client.[EXERDESC],
EXERNOW Client.[EXERNOW],
FAX Client.[FAX],
FIRST Client.[FIRST],
FLAG Client.[FLAG],
GIRLBOY Client.[GIRLBOY],
GYMNAME Client.[GYMNAME],
GYMID Client.[GYMID],
GYMSTATE Client.[GYMSTATE],
HISTAVET Client.[HISTAVET],
HISTCOMENC Client.[HISTCOMENC],
HISTT Client.[HISTT],
HISTTOT Client.[HISTTOT],
HISWK Client.[HISWK],
HOLDMAIL Client.[HOLDMAIL],
HOLDPAY Client.[HOLDPAY],
HOMEPHONE Client.[HOMEPHONE],
IBODYBUILD Client.[IBODYBUILD],
IGENERAL Client.[IGENERAL],
IMUSCLE Client.[IMUSCLE],
INITIALS Client.[INITIALS],
INSTRUCTOR Client.[INSTRUCTOR],
INVOICETOT Client.[INVOICETOT],
INVTOT Client.[INVTOT],
IOTHER Client.[IOTHER],
IREHAB Client.[IREHAB],
ISPORTCOND Client.[ISPORTCOND],
IWEIGHTDWN Client.[IWEIGHTDWN],
IWEIGHTUP Client.[IWEIGHTUP],
LAST Client.[LAST],
LADD4 Client.[LADD4],
LADD1 Client.[LADD1],
LADD2 Client.[LADD2],
LADD3 Client.[LADD3],
LASTDAY Client.[LASTDAY],
LASTVIS Client.[LASTVIS],
LETTER2GO Client.[LETTER2GO],
LSTATE Client.[LSTATE],
MARITAL Client.[MARITAL],
MIDDLE Client.[MIDDLE],
MISSED Client.[MISSED],
MOBILEPH Client.[MOBILEPH],
NAME Client.[NAME],
NEWCONTACT Client.[NEWCONTACT],
NOMAIL Client.[NOMAIL],
NOTES Client.[NOTES],
OCCUPATION Client.[OCCUPATION],
OK_2GO_LIV Client.[OK_2GO_LIV],
OTHERINT Client.[OTHERINT],
OUTSTANDIN Client.[OUTSTANDIN],
OVERDUECAT Client.[OVERDUECAT],
PADD4 Client.[PADD4],
PADD1 Client.[PADD1],
PADD2 Client.[PADD2],
PADD3 Client.[PADD3],
PAIDADFTOT Client.[PAIDADFTOT],
PAIDCLBTOT Client.[PAIDCLBTOT],
PAYFREQ Client.[PAYFREQ],
PCOUNTRY Client.[PCOUNTRY],
PHONE Client.[PHONE],
PHOTO Client.[PHOTO],
PMTBALANCE Client.[PMTBALANCE],
PMTDUE Client.[PMTDUE],
PMTLAST Client.[PMTLAST],
PPOSTCODE Client.[PPOSTCODE],
POSTCODE Client.[POSTCODE],
PROSPECT Client.[PROSPECT],
PSTATE Client.[PSTATE],
PURCHNUM Client.[PURCHNUM],
PURCHTOTAM Client.[PURCHTOTAM],
RECPTTOT Client.[RECPTTOT],
REFCOUNT Client.[REFCOUNT],
RELATIONSH Client.[RELATIONSH],
REVERSETOT Client.[REVERSETOT],
REVERSFLAG Client.[REVERSFLAG],
SOURCE Client.[SOURCE],
STATUS Client.[STATUS],
STDCODE Client.[STDCODE],
SUSPMEMO Client.[SUSPMEMO],
SWIPECODE Client.[SWIPECODE],
TAGSISSUED Client.[TAGSISSUED],
TERMT Client.[TERMT],
TERMTOT Client.[TERMTOT],
TERMWK Client.[TERMWK],
TITLE Client.[TITLE],
TMAVET Client.[TMAVET],
TOTALCALLS Client.[TOTALCALLS],
TRADE Client.[TRADE],
TYPE Client.[TYPE],
WHOUPDATE Client.[WHOUPDATE],
WITNESS Client.[WITNESS],
WORKPHONE Client.[WORKPHONE],
YEARAVET Client.[YEARAVET],
YEARTOT Client.[YEARTOT],
YEARTOTAL Client.[YEARTOTAL],
YEARWKLY Client.[YEARWKLY]
ENDTEXT
lcNameList = STRTRAN(lcNameList, VFP_CRLF, [ ])

TEXT TO lcFieldList NOSHOW PRETEXT 2
ACCTNAME,
ACCTTYPE,
ADDEDDATE,
ADDPMT,
ALTCODE,
ASSDT,
ASSNXT,
BANK,
BANKACCT,
BANKNAME,
BANKSID,
BRANCHNAME,
BSB,
CARDHELD,
CCARDOK,
CCEXPIRE,
CCHOLDDTE,
CCHOLDER,
CCHOLDWHY,
CCNAME,
CLIENTNAME,
CLIENTNO,
CLIREF,
CLIUPDATE,
CLSUSPEND,
COMMENCING,
CONTNO,
CREDITCARD,
CTRYCODE,
DATESTAMP,
DC00,
DC99,
DDHOLDDTE,
DDHOLDWHY,
DEBITDAY,
DEBITHELD,
DEBITOK,
DEBTLETDAT,
DEBTLETNAM,
DOB,
EMAIL,
EMERGNAME,
EMERGPHONE,
EMPLOYER,
ENTRYID,
ENTRYMEMO,
ENTRYPRES,
EXERDESC,
EXERNOW,
FAX,
FIRST,
FLAG,
GIRLBOY,
GYMNAME,
GYMID,
GYMSTATE,
HISTAVET,
HISTCOMENC,
HISTT,
HISTTOT,
HISWK,
HOLDMAIL,
HOLDPAY,
HOMEPHONE,
IBODYBUILD,
IGENERAL,
IMUSCLE,
INITIALS,
INSTRUCTOR,
INVOICETOT,
INVTOT,
IOTHER,
IREHAB,
ISPORTCOND,
IWEIGHTDWN,
IWEIGHTUP,
LAST,
LADD4,
LADD1,
LADD2,
LADD3,
LASTDAY,
LASTVIS,
LETTER2GO,
LSTATE,
MARITAL,
MIDDLE,
MISSED,
MOBILEPH,
NAME,
NEWCONTACT,
NOMAIL,
NOTES,
OCCUPATION,
OK_2GO_LIV,
OTHERINT,
OUTSTANDIN,
OVERDUECAT,
PADD4,
PADD1,
PADD2,
PADD3,
PAIDADFTOT,
PAIDCLBTOT,
PAYFREQ,
PCOUNTRY,
PHONE,
PHOTO,
PMTBALANCE,
PMTDUE,
PMTLAST,
PPOSTCODE,
POSTCODE,
PROSPECT,
PSTATE,
PURCHNUM,
PURCHTOTAM,
RECPTTOT,
REFCOUNT,
RELATIONSH,
REVERSETOT,
REVERSFLAG,
SOURCE,
STATUS,
STDCODE,
SUSPMEMO,
SWIPECODE,
TAGSISSUED,
TERMT,
TERMTOT,
TERMWK,
TITLE,
TMAVET,
TOTALCALLS,
TRADE,
TYPE,
WHOUPDATE,
WITNESS,
WORKPHONE,
YEARAVET,
YEARTOT,
YEARTOTAL,
YEARWKLY
ENDTEXT
lcFieldList = STRTRAN(lcFieldList, VFP_CRLF, [ ])

TEXT TO lcFuncList NOSHOW PRETEXT 2
ACCTNAME RTRIM,
ACCTTYPE RTRIM,
ALTCODE RTRIM,
BANK RTRIM,
BANKACCT RTRIM,
BANKNAME RTRIM,
BANKSID RTRIM,
BRANCHNAME RTRIM,
BSB RTRIM,
CCHOLDER RTRIM,
CCHOLDWHY RTRIM,
CCNAME RTRIM,
CLIENTNAME RTRIM,
CLIENTNO RTRIM,
CLIREF RTRIM,
CONTNO RTRIM,
CREDITCARD RTRIM,
CTRYCODE RTRIM,
DDHOLDWHY RTRIM,
DEBITDAY RTRIM,
DEBTLETNAM RTRIM,
EMAIL RTRIM,
EMERGNAME RTRIM,
EMERGPHONE RTRIM,
EMPLOYER RTRIM,
ENTRYID RTRIM,
EXERDESC RTRIM,
FAX RTRIM,
FIRST RTRIM,
GIRLBOY RTRIM,
GYMNAME RTRIM,
GYMID RTRIM,
GYMSTATE RTRIM,
HOMEPHONE RTRIM,
INITIALS RTRIM,
INSTRUCTOR RTRIM,
LAST RTRIM,
LADD4 RTRIM,
LADD1 RTRIM,
LADD2 RTRIM,
LADD3 RTRIM,
LETTER2GO RTRIM,
LSTATE RTRIM,
MARITAL RTRIM,
MIDDLE RTRIM,
MOBILEPH RTRIM,
NAME RTRIM,
OCCUPATION RTRIM,
OTHERINT RTRIM,
PADD4 RTRIM,
PADD1 RTRIM,
PADD2 RTRIM,
PADD3 RTRIM,
PAYFREQ RTRIM,
PCOUNTRY RTRIM,
PHONE RTRIM,
PHOTO RTRIM,
PPOSTCODE RTRIM,
POSTCODE RTRIM,
PROSPECT RTRIM,
PSTATE RTRIM,
RELATIONSH RTRIM,
SOURCE RTRIM,
STATUS RTRIM,
STDCODE RTRIM,
SWIPECODE RTRIM,
TITLE RTRIM,
TYPE RTRIM,
WHOUPDATE RTRIM,
WITNESS RTRIM,
WORKPHONE RTRIM
ENDTEXT
lcFuncList = STRTRAN(lcFuncList, VFP_CRLF, [ ])

WITH THIS
.UpdatableFieldList = lcFieldList
.UpdateNameList = lcNameList
.ConversionFunc = lcFuncList
.KeyFieldList = 'clientno'
.CursorSchema = lcSchema
._BuildSelectCmd()
ENDWITH


> Interestingly in my search for a solution,
> I recently read a header of an article from FOXPROADVISOR.com
>
> "Defeat the 255-Character Limit (JUNE 20004 ISSUE)
> Here's a workaround to VFP 8's 255-character limit for a single property in the Property Sheet.


ENTIRE THREAD

255 char length of CA's and other tips Posted by Boudewijn Lutgerink @ 8/13/2004 9:48:55 AM
RE: 255 char length of CA's and other tips Posted by joe Gonzalez @ 9/6/2004 6:42:38 PM
RE: 255 char length of CA's and other tips Posted by Bernard Bout @ 9/7/2004 6:05:59 AM
RE: 255 char length of CA's and other tips Posted by joe Gonzalez @ 9/8/2004 6:03:54 PM
RE: 255 char length of CA's and other tips Posted by Boudewijn Lutgerink @ 9/9/2004 9:42:52 AM
RE: 255 char length of CA's and other tips Posted by Bernard Bout @ 9/10/2004 8:41:03 AM