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

I never use scx, I have all in classes and instanciate objects from this classes at may needs. So I can not bound a DE to a form. (at least not in a way that make sence for RAD)

The suggestion is NOT to use the properties. Just let it empty and fill it at runtime using code. If you need the drag'n'drop thing, follow Marks advice with the 'doubled' tables.

Agnes
>Hi Agnes,
>
>My problem with that is when you add the cursor adapter to the data environment it brings through the CursorSchema, which when you save it, it becomes too long for foxpro to handle and won't let me open the form at all until I hack the scx and completely remove the CursorSchema property.
>
>That fixes the problem completely until I next save the form for ANY kind of change, in which case the property becomes too long again and I have to re-hack the file.
>
>I can't see any way I can use the CursorAdapters with the DataEnvironment with this issue (unless anyone can tell me of a work around) unfortunately.
>
>Thanks,
>
>Michael Henstock
>AWS
>
>>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
Répondre
Fil
Voir

Click here to load this message in the networking platform