Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A combo with the rowsourcetype = SQL Statement
Message
De
05/10/2009 14:21:08
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01427773
Message ID:
01427795
Vues:
63
Same problem with READWRITE
2 values.

>Yossi,
>what happens if you put READWRITE at the end?
>How many values you have in combo?
>
>this.RowSource = 'select distinct cDe from itLook where cNaTable = "PRTDISP" into cursor curCombo READWRITE'
>this.RowSourceType = 3
>
>
>
>>This code results in:
>>
>>
>>cannot access the selected table: curCombo
>>
>>
>>>combobox Init event:
>>>
>>>select distinct cDe from itLook where cNaTable = "PRTDISP" into cursor curCombo nofilter
>>>this.RowSource = "curCombo"
>>>this.RowSourceType = 2 && Alias
>>>this.Requery()
>>>
>>>
>>>>What do you mean, an alias? Could you show an example?
>>>>
>>>>>Can you use an alias for the combo's RowSource instead?
>>>>>
>>>>>See also http://berezniker.com/content/pages/visual-foxpro/cannot-access-selected-table-error-1152
>>>>>
>>>>>>Hi All:
>>>>>>
>>>>>>I have a combo class with the rowsourcetype = SQL Statement.
>>>>>>
>>>>>>The statement reads thus:
>>>>>>
>>>>>>
>>>>>>sele dist Cde from itlook where cnatable = 'PRTDISP' into curs "Z"+ substr(sys(2015),3,10)
>>>>>>
>>>>>>
>>>>>>The itlook table contains two possible values, 'Display' or 'Print'.
>>>>>>
>>>>>>This problem started when I wrote the init method:
>>>>>>
>>>>>>In the init I have:
>>>>>>
>>>>>>
>>>>>>this.Value = 'Display'
>>>>>>
>>>>>>
>>>>>>In some forms that use this combo, I'm getting the following message when instantiating the form:
>>>>>>
>>>>>>
>>>>>>Cannot access the selected table
>>>>>>
>>>>>>
>>>>>>It then appends the SQL code.
>>>>>>
>>>>>>Again, This problem started when I wrote the init method.
>>>>>>
>>>>>>What gives?
>>>>>>
>>>>>>Yossi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform