Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cursor Adapter Builder
Message
From
21/07/2003 19:05:04
 
 
To
21/07/2003 05:30:47
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00811934
Message ID:
00812177
Views:
27
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
A fish this fine deserves to be a fish nugget styled chunklet.
- Fry
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform