Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with Parameterized view
Message
De
16/04/2000 17:59:40
 
 
À
16/04/2000 16:45:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00360173
Message ID:
00360188
Vues:
9
>I have the following view
>create sql view vwconspessoa as ;
>SELECT Pessoa.nmpessoa,;
> IIF(Pessoa.idpessoa=1,"Física","Jurídica") AS idpessoa,;
> Municipio.nmmunicip, Atividade.nmatividade, Pessoa.nrfone, Pessoa.nrfax,;
> Pessoa.nmemail, Pessoa.nrpessoa;
> FROM advbmala!pessoa, advbmala!municipio, ;
> advbmala!atividade ;
>WHERE Pessoa.nrmunicip = Municipio.nrmunicip AND ;
> Pessoa.nratividade = Atividade.nratividade AND ;
> UPPER(pessoa.nmpessoa) LIKE UPPER(?parm_condicao) ;
> ORDER BY Pessoa.nmpessoa, Municipio.nmmunicip
>
>Every time I change the parm_condicao I get the message "view definition has been changed" (error 1494)
>
>The parm_condicao assumes values like 'p%' or '%de%'
>
>What is wrong?

Most likeley, the parameter has absolutely nothing to do with it. The IIF() function in your select is the culprit. Different results sets are resulkting in columns of varying width from REQUERY to REQUERY. Try instead:

IIF(Pessoa.idpessoa=1,"Física ","Jurídica") AS idpessoa,;


Notice the two trailing spaces after "Fisica" to ensure that the field is always the same size.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform