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:
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)," ")
lcTemp = STRTRAN(lcTemp,dcTab,"")
THIS.SELECTCMD = lcTemp
TEXT TO lcTemp NOSHOW PRETEXT 7
CNAME C(40),
CSomeField C( 5)
ENDTEXT
lcTemp = STRTRAN(lcTemp,CHR(13)+CHR(10), "")
THIS.CURSORSCHEMA = lcTemp
TEXT TO lcTemp NOSHOW PRETEXT 7
ENDTEXT
lcTemp = STRTRAN(lcTemp,CRLF, "")
THIS.TABLES = lcTemp
TEXT TO lcTemp NOSHOW PRETEXT 7
ENDTEXT
lcTemp = STRTRAN(lcTemp,CRLF, "")
THIS.KEYFIELDLIST = lcTemp
TEXT TO lcTemp NOSHOW PRETEXT 7
ENDTEXT
lcTemp = STRTRAN(lcTemp,CRLF, "")
THIS.UPDATABLEFIELDLIST = lcTemp
TEXT TO lcTemp NOSHOW PRETEXT 7
ENDTEXT
lcTemp = STRTRAN(lcTemp,CRLF, "")
THIS.UPDATENAMELIST = lcTemp
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.
OffThere is no place like [::1]