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
Titre:
Alias 'ViewName' Not Found when exiting form
Divers
Thread ID:
00534076
Message ID:
00534076
Vues:
42
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


Many thanks for any input,

Todd
The day you take complete responsibly for yourself, the day you stop making any excuses, thats the day you start to the top. - O.J. Simpson

Great advice from a questionable source...
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform