Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How long can be a string for a property?
Message
From
17/08/2019 22:32:32
 
 
To
17/08/2019 11:31:20
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Contracts, agreements and general business
Miscellaneous
Thread ID:
01670126
Message ID:
01670146
Views:
60
Yes, I have a clear memory of that being the case. I think Tamar documented it, in fact.

>>>>Hi,
>>>>
>>>>I am storing a long SQL Select string into a property of a form (property name SQL_SELECT). So far, I don't get any errors.
>>>>But, just in case, what is the max length of the string I could store in a property?
>>>>
>>>>TIA
>>>
>>>For an SQL select string it is 8192.
>>
>>Note that this is the "compiled" length not the text length. I remembered that much -- I forget how to get the compiled length.
>>
>>Hank
>
>Are you sure it is not the text length but compiled length?
>
>
>CREATE CURSOR mytable (dummy c(10))
>INSERT INTO mytable VALUES ('a')
>
>lcSQL = "Select * from myTable where myTable.Dummy = 'a' INTO CURSOR crsDummy nofilter"
>lcDummy = space(8192-LEN(m.lcSQL)+1)
>
>Select * from myTable where myTable.Dummy = 'a' &lcDummy.INTO CURSOR crsDummy nofilter
>
>
>This fails for me. If I decrease the command line length by changing + 1 to -2 it works.
>Same happens here:
>
>Public oForm
>
>oForm = Createobject('MyForm')
>oForm.Show()
>
>Define Class MyForm As Form
>	Add Object lb As ListBox
>
>	Procedure Load
>		Create Cursor mytable (dummy c(10))
>		Insert Into mytable Values ('a')
>	Endproc
>
>	Procedure lb.Init
>		lcSQL = "Select * from myTable where myTable.Dummy = 'a' INTO CURSOR crsDummy nofilter"
>		lcDummy = Space(8192-Len(m.lcSQL)+1)
>
>		This.RowSourceType=3
>		This.RowSource = "Select * from myTable where myTable.Dummy = 'a' "+m.lcDummy+"INTO CURSOR crsDummy nofilter"
>	Endproc
>Enddefine
>
>
>I am pretty sure in both cases compiled length would be much shorter if it didn't deny to compile.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform