Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with Parameterized view
Message
From
16/04/2000 17:59:40
 
 
To
16/04/2000 16:45:10
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00360173
Message ID:
00360188
Views:
10
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform