Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alias 'ViewName' Not Found when exiting form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00534076
Message ID:
00534093
Vues:
14
>Greetings,
>
>My view was created external to my form through code (instead of view wizard).
>
>My file maintenance form was then created using the form wizard with the view as the main data source in the form's private data environment.
>
>After running the form and adding several records, the following error appears upon trying to exit:
>
>ALIAS 'VIEWNAME' IS NOT FOUND
>ERROR: 13
>METHOD: FORM1.DATAENVIRONMENT.CLOSETABLES
>LINE: 0
>
>The view ends up being left open...
>
>Below is the code used to create the view:
>
>* create view: lb_maint
>Open database \nnjvfp\data\main.dbc
>Set database to \nnjvfp\data\main.dbc
>Create sql view 'obdview' as;
>select biddet .*,;
>product.prodesc, product.procd,;
>prodesc.pdprodesc,prodesc.pdcd,;
>prodclass.*,;
>trim(propaddr.astnumb) + ' ' + trim(propaddr.astname) + ' ' + propaddr.acompany as na, propaddr.hoacd;
>from main!biddet;
>left join main!product on biddet.bdprocd = product.procd;
>left join main!prodesc on biddet.bdpdcd = prodesc.pdcd;
>left join main!prodclass on prodesc.pdclcd = prodclass.pcclcd;
>left join main!propaddr on biddet.bdaddrcd = propaddr.addrcd;
>where biddet.bdordercd = ?m.passordercd;
>order by na, pccldesc, pdprodesc
>dbsetprop('obdview', 'view', 'tables', 'main!biddet')
>dbsetprop('obdview.biddetcd', 'field', 'keyfield', .t.)
>dbsetprop('obdview', 'view', 'sendupdates', .t.)
>close data all

This is usually caused by closing the view or cursor before a control that uses it as its controlsource (combo, etc.) is destroyed.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform