Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stuck with combobox control source max length
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Stuck with combobox control source max length
Miscellaneous
Thread ID:
00047952
Message ID:
00047952
Views:
78
Hi,

For a combobox I need the following code as rowsource.

this.RowSource = "SELECT cCode, cLib, couleur.cid DISTINCT " + ;
" FROM (((Autosoft!Couleur INNER JOIN Autosoft!Marque ON couleur.cMarqueId = Marque.cid) " + ;
" INNER JOIN Autosoft!Tarif ON Marque.cID = Tarif.cMArqueID) " + ;
" INNER JOIN Autosoft!Vehicule ON Tarif.cID = Vehicule.cTarifId) " + ;
" WHERE Couleur.cTypeId = [2] AND Vehicule.cTarifId = EVAL(this.TAG) " + ;
" ORDER BY Couleur.cCode INTO CURSOR cVPClrEx "

In the control TAG, I put the value "v_vehicule.cTarifID"

This would work fine if did not exceed the 256 chars limit. But this one is far too long and there is
no way to make it shorter.

So I decided to take another road, set my Row source Type to 4 (QPR) and send the code back to
a .QPR file. Sounds easy? Yeah. But it fails, because of this.TAG (the .QPR is outside of the object).

SELECT cCode, cLib, couleur.cid DISTINCT ;
FROM (((Autosoft!Couleur INNER JOIN Autosoft!Marque ON couleur.cMarqueId = Marque.cid) ;
INNER JOIN Autosoft!Tarif ON Marque.cID = Tarif.cMArqueID) ;
INNER JOIN Autosoft!Vehicule ON Tarif.cID = Vehicule.cTarifId) ;
WHERE Couleur.cTypeId = [2] AND Vehicule.cTarifId = EVAL(this.TAG) ;
ORDER BY Couleur.cCode INTO CURSOR cVPClrEx

Any idea how to get around this one?
Next
Reply
Map
View

Click here to load this message in the networking platform