>I have the view in my data envirnoment (data environment contains a view called lv_dposcr and a table called person_tbl) and it seems like it opens the view automatically, where can I define my index tags in data environment. I tried it in my form (frm_dposcr) init proceed as follows
>
>&& frm_dposcr.init
>with thisform
>lparameters a, b, c && a = dpo name, startdate, enddate
> .a = a
> .b = b
> .c = c
> .grd.readonly = .t.
> lc_dpo = .a
> lc_fdate = .b
> lc_tdate = .c
> index on my_c tag p_lname
> requery('lv_dposcr')
> .refresh()
> .grd.refresh()
>endwith
>
>When I go to run my program it keeps saying "p_lname already exists, overwrite it?" (I think this is because my view is based on my person_tbl. person_tbl is also in my data enviroment). I am not sure where to create the tags if my view is going to open automatically in data environment. My grid is linked to the view so I cannot leave the view out of my data environment otherwise I get errors that my grid cannot find lv_dposcr. Any suggestions. Thanks for answering back.
>
SET SAFETAY OFF - do it in each Load of a form, since it scopes to the DataSession.
>Nick Patel