>OK it sound good. Is the following a stored procedure or created in the program.
>
>CREATE SQL VIEW "LV_CUST" ;
>AS SELECT * FROM f:\pro30\ardata\arcust01 ;
>where arcust01.custno= ?vp_custno
>
>I think it is created in the program.
>Right now we use stored views. Could this be the trouble???????
>
>John
Copy that code and put it in a program \progs\lv_cust
Now run that program, and your DBC will now be updated with the view {gross details only, no data updating yet}.
You can then do the folowwing in a prg:
vp_custno = "8000" && or what ever your test customer # is
USE LV_CUST
brow
You should see the brow window pop right away. If it takes a while, then your index neeeds some polish.
This is all the customers:
CREATE SQL VIEW "LV_CUST_all" ;
AS SELECT * FROM f:\pro30\ardata\arcust01
to use this properly in a grid:
use lv_cust_all in 0 alias v_custno_all nodata
sele v_cust_all
index on custno tag custno
index on company tag company
requery()
This will bring in a shell of the table, allow you to index on what is important, and then fetch the data to support it.
In your grid add code to the headers click evnet setting the order to the corresponding index for that column.
Notice that I don't waste the horsepower of the server on ORDER by ? Because I can have the local view do that for me.