Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OpenTables() freezes client computers opening views
Message
De
23/08/2001 10:50:00
 
 
À
23/08/2001 09:15:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00546445
Message ID:
00547976
Vues:
9
>>However your best suggestion is to 'use macro expansion for individual clauses in SELECT, rather than for the whole thing'.
>>I had macro expanded the whole statement to allow for statements like :
>
>if not empty(cJoinCondition)
>  cSQL = cSQl + cJoinCondition
>endif
>
but I can work around this.
>Thank you verey much for your help.

Just for the record here is what I came up with:
*** ClassLib BaseApp : class LocalView : Method CreateSQL
#INCLUDE IT.H
local ;
	cViewName,;
	cFieldSection,;
	cJoinSection,;
	cSelectSQL,;
	cParentTable

this.cDoing = "Creating View : " + proper(this.cViewName)
*** following suggusted by Al Doman UT #018083
*** previously built a single macro expansion 
cParentTable  = this.cParentTable
cViewName     = this.cViewName
cFieldSection = this.cFieldSection
cJoinSection  = this.cJoinSection
cSelectSQL    = iif(empty(this.cSelectSQL),""," where " + this.cSelectSQL)
cOrderBy      = iif(empty(this.cOrderBy),""," order by " + this.cOrderBy)

Create SQL view &cViewName ;
	as select &cFieldSection ;
	from &cParentTable ;
	&cJoinSection ;
	&cSelectSQL ;
	&cOrderBy

*** Class Error Method puts error message in this.cDoing
return this.cDoing = "Creating View : " + this.cViewName
Once again I thank Al & Nancy for their help
Best Regards
Don Simpson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform