Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding Custom View Parameter?
Message
De
08/09/2008 09:55:52
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Adding Custom View Parameter?
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01345719
Message ID:
01345719
Vues:
61
Hello all. I am attempting to design a security system for our software.
I am using the Mere Mortals framework.
In my design, the administrative user defines what records the normal users should see.

Using a form, the administrator picks options to filter the record set for each user, and I store part of a WHERE statement built from the chosen options in a table for that user. For instance, if the administrator picks that user Betty should only see records in the city of San Franciso. I store (city.cid = " 13") for user Betty.

When Betty logs in , I want to append that last statement on the end of my view. My views are all in code, so I define a vp_filter. On the search form for the view, I set the custom WHERE string into vp_filter.
In my view, I build the SQL, Select * from where ...
...
and ?vp_filter.

I am getting a SQL error on this statement. Should this be a macro expansion instead? e.g. &vp_filter?

Sorry for the long post, I hope what I am trying to do makes sense. (Or is even correct!)

TIA
Amanda
Amanda Morton
System Analyst
Harrisburg Project
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform