>again, view designes is destoying my nice views...
>
>in command window i wrote that:
>CREATE SQL VIEW MYVIEW AS;
>SELECT *;
>FROM MYDATA;
>WHERE;
>F1=?V1;
>AND F2=?V2
>AND (F3=?V3 OR F4=?V4);
>AND F5=?V5;
>AND F6=?V6
>
>it worked fine!
>BUT.
>If I open the view with the view designer,
>it MODIFIES the original sql sentente to:SELECT *;
>FROM MYDATA;
>WHERE;
>F1=?V1;
>AND F2=?V2
>AND F3=?V3 OR (F4=?V4;
>AND F5=?V5;
>AND F6=?V6)
>
>
>( or something like that)
>
>and DESTROY my SQL.
>
>Ok, I will NOT open it in view designer, but what happend if someones opens it?? It will not work anymore.
>
>The DBC`s Memo field stores the view correct until I Use the view designer.
>
>Some GURU has a solution for that???
>
>We are using the same designer form VF3 in VF6, and the same problems, of course.
>
>I think we need other view designer as soon as possible.
Unfortunately view designer has limited capabilities. Every user has the capability of screwing views. They could do it just changing a parameter too.
Anyway you could check the SQL before using it and if screwed, drop the view and recreate.
?dbgetprop("myView","View","SQL") would return the sql.
Or do not arm the user with VFP :)
Cetin