Hi,

in a combo with rowsourcetype=3, I store a SQL statement in rowsource
property. The length of that statement may be >> 256, and the combo runs
without failure (its cursor is OK, with all the lines I expect)

but I need to read this rowsource property in an other method, and it
returns only 256 characters.
Is it an error in my program, a bug, or <by design>?

--
Michel Lévy
Communauté Francophone des Professionnels FoxPro
Pour un développement durable...
http://www.atoutfox.org
--

Re: Rowsource length limitation? by Man-wai

Man-wai
Fri Apr 13 09:17:06 CDT 2007

> in a combo with rowsourcetype=3, I store a SQL statement in rowsource
> property. The length of that statement may be >> 256, and the combo runs
> without failure (its cursor is OK, with all the lines I expect)

Easy workaround: direct the output of that long SQL statement into a
cursor, and make the combobox to use alias of the cursor as rowsource.

--
.~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10) Linux 2.6.20.6
^ ^ 22:16:01 up 6 days 5:07 0 users load average: 1.00 1.02 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

Re: Rowsource length limitation? by Michel

Michel
Fri Apr 13 09:31:21 CDT 2007

Thanks, but...

I need to read this SQL statement from everywhere in the form, and that's
why I've choosen rowsourcetype=3 for that class.
so your workaround is not a workaround for my problem.

--
Michel
--
"Man-wai Chang" <toylet.toylet@gmail.com> a ecrit dans le message de news:
uTjKsZdfHHA.1008@TK2MSFTNGP05.phx.gbl...
>> in a combo with rowsourcetype=3, I store a SQL statement in rowsource
>> property. The length of that statement may be >> 256, and the combo runs
>> without failure (its cursor is OK, with all the lines I expect)
>
> Easy workaround: direct the output of that long SQL statement into a
> cursor, and make the combobox to use alias of the cursor as rowsource.
>
> --
> .~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
> / v \ Simplicity is Beauty! May the Force and Farce be with you!
> /( _ )\ (Ubuntu 6.10) Linux 2.6.20.6
> ^ ^ 22:16:01 up 6 days 5:07 0 users load average: 1.00 1.02 1.00
> news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk



Re: Rowsource length limitation? by Olaf

Olaf
Fri Apr 13 10:02:26 CDT 2007

> I need to read this SQL statement from everywhere in the form
for what reason? to execute it?

The 256 Character limit of rowsource is by design,
but you can store longer strings to other, eg user defined
properties.

oForm=CREATEOBJECT("form")
oForm.AddProperty("rowsource",SPACE(257))
? LEN(oForm.rowsource)

or use the comment property of the combobox:
oCombo = CREATEOBJECT("combobox")
oCombo.comment = SPACE(257)
? LEN(oCombo.comment)

And set
oCombo.rowsource=oCombo.comment
at the init() of the combobox or whenever
you want.

Bye, Olaf.

Re: Rowsource length limitation? by Michel

Michel
Fri Apr 13 10:42:06 CDT 2007

thanks, Olaf

I'll use that workaround, but its amazing: rowsource property has no limit
when you assign a value (a select statement longer than 256 charcters runs
as expected, all the rows and columns are at their right place with the
correct value), but on an access it's limited to 256!


--
Michel Lévy
Communauté Francophone des Professionnels FoxPro
Pour un développement durable...
http://www.atoutfox.org
--
"Olaf Doschke" <olaf.doschke@t-aufderlinie.de> a écrit dans le message de
news: uLbzQzdfHHA.4772@TK2MSFTNGP05.phx.gbl...
>> I need to read this SQL statement from everywhere in the form
> for what reason? to execute it?
>
> The 256 Character limit of rowsource is by design,
> but you can store longer strings to other, eg user defined
> properties.
>
> oForm=CREATEOBJECT("form")
> oForm.AddProperty("rowsource",SPACE(257))
> ? LEN(oForm.rowsource)
>
> or use the comment property of the combobox:
> oCombo = CREATEOBJECT("combobox")
> oCombo.comment = SPACE(257)
> ? LEN(oCombo.comment)
>
> And set
> oCombo.rowsource=oCombo.comment at the init() of the combobox or whenever
> you want.
>
> Bye, Olaf.