Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Another strange listbox, or just gremlins
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00041567
Message ID:
00041623
Vues:
29
>>I have a listbox with an alias as the rowsource. The user can select the type of data to display in the listbox by selecting one of three radio buttons. The radio buttons re-create the cursor that is the rowsource for the listbox, and then redisplay the listbox. They do this by calling a method on the form. When I run the compiled EXE from within VFP, everything works great. However, when I run it out of VFP I get a syntax error on the line that resets the rowsource for the listbox. I have narrowed it down to one specific field that is displayed in the listbox, and can now get things to work by selecting that field AS another name. What really scares me is that the init of the form also call the method to build the listbox, and that call works even if I don't use select AS. Does anyone have any ideas how can the same code run correctly one time, and generate an error the next?
>>
>>TIA
>
>Rick, what is the field name which causes the problem? It's possible that you are using a reserved word. There was a thread a couple months ago about strange problems in SQLs when DESC was a field name - a common short version of DESCRIPTION. Other examples were given at the same time.
>
>The reason for the difference between running under VFP and as an EXE is where the program looks for function calls (its internal functions, not UDFs).
>
>HTH
>Barbara

Hi Barbara,

Thanks for responding. The field name is INV_TOTAL. I have seen the problems with reserved words in an SQL statement if you issue something like "select order from cust", but I'm simply issuing "select *" from the file. I don't believe that inv_total is a reserved word. The select statement works ok, but when I set the rowsource I get the error. Also, the field name doesn't cause a problem when the listbox is initially displayed, only when it is updated.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform