Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursor Adapter Builder
Message
De
21/07/2003 05:30:47
Lutz Scheffler (En ligne)
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
21/07/2003 04:02:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00811934
Message ID:
00811946
Vues:
24
Hi Michael,

just put the strings in your init the same way VFP's builder does . For me, it's allways a good idea to store it in code then in the Property Sheet, even if it does not reach the 255 chars. If you use TEXT .. ENDTEXT to create the string, you get a formatable string with syntax higlithing like:
***<SelectCmd>
TEXT TO lcTemp NOSHOW PRETEXT 7
  SELECT
   Auftrag.cName,
   Auftrag.cSomefield
   FROM  Auftrag
   WHERE
    (Auftrag.iTyp=dnTyp_Projekt
     AND Auftrag.iSubTyp=1
     AND (llAllProjekt
      OR Auftrag.iObJ_Ix=lnProjekt_Ix
     ) AND (llAuftrag
      OR !Auftrag.L1F2
     )
    ) OR (llAuftrag
     AND Auftrag.iTyp=1
     AND Auftrag.iSubTyp=1
    )
   ORDER BY 2
ENDTEXT
lcTemp = STRTRAN(lcTemp,CHR(13)+CHR(10)," ")     &&clean extra linebreaks
lcTemp = STRTRAN(lcTemp,dcTab,"")                &&clean extra tabs
THIS.SELECTCMD = lcTemp                          &&store to property
***</SelectCmd>

***<CursorSchema>
TEXT TO lcTemp NOSHOW PRETEXT 7
   CNAME      C(40),
   CSomeField C( 5)
ENDTEXT
lcTemp = STRTRAN(lcTemp,CHR(13)+CHR(10), "")     &&clean extra linebreaks
THIS.CURSORSCHEMA = lcTemp                       &&store to property
***</CursorSchema>

* and so on
***<Tables>
TEXT TO lcTemp NOSHOW PRETEXT 7

ENDTEXT
lcTemp = STRTRAN(lcTemp,CRLF, "")
THIS.TABLES = lcTemp
***</Tables>

***<KeyFieldList>
TEXT TO lcTemp NOSHOW PRETEXT 7

ENDTEXT
lcTemp = STRTRAN(lcTemp,CRLF, "")
THIS.KEYFIELDLIST = lcTemp
***</KeyFieldList>

***<UpdatableFieldList>
TEXT TO lcTemp NOSHOW PRETEXT 7

ENDTEXT
lcTemp = STRTRAN(lcTemp,CRLF, "")
THIS.UPDATABLEFIELDLIST = lcTemp
***</UpdatableFieldList>

***<UpdateNameList>
TEXT TO lcTemp NOSHOW PRETEXT 7

ENDTEXT
lcTemp = STRTRAN(lcTemp,CRLF, "")
THIS.UPDATENAMELIST = lcTemp
***</UpdateNameList>
Note that there is no semikolon used.

I have this in an extra method. It's very better to read this method then try to figure out the n-th field in some 100 Fields UPDATENAMELIST property.

The only tricky thing lieft is to call this Method in the right moment. (You can not trust on Init, because Autoload may fire before INIT, again to come around this check the code VFP nativ builder generates to come around this.

Have look of "CursorAdapter VCX Builder " from Mark McCasLand download file#17264 for a very good example.

HTH
Agnes
>Hi Everyone,
>
>Is there any way to get around the cursor adapter builders 255 character limit on the CursorSchema?
>
>I assume the limit is because of the properties window or something like that, because when I tested it in a prg it seemed to work fine (with a few other minor issues when importing into a data environment)
>
>Thanks,
>
>Michael Henstock
>AWS
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform